This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch dependabot/pip/pytest-8.0.2
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 841dea766478f37c086dbc19f0a88c5107dad99b
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Tue Apr 16 18:57:24 2024 +0200

    Fix bug in the base MockHttp class which was there for a long time since
    we incorrectly used class attribute value instead of the value passed to
    the method.
    
    This could result in all kinds of weird edge cases and test failures in
    case the environment wasn't correctly reset before / after each test.
---
 libcloud/test/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcloud/test/__init__.py b/libcloud/test/__init__.py
index 37a74b2b3..d45c82c84 100644
--- a/libcloud/test/__init__.py
+++ b/libcloud/test/__init__.py
@@ -205,7 +205,7 @@ class MockHttp(LibcloudConnection):
         )  # Python 3.7 no longer quotes ~
 
         if type:
-            meth_name = "{}_{}".format(meth_name, self.type)
+            meth_name = "{}_{}".format(meth_name, type)
 
         if use_param and use_param in qs:
             param = qs[use_param][0].replace(".", "_").replace("-", "_")

Reply via email to