summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2022-09-30 10:50:55 +0100
committerStephen Finucane <stephenfin@redhat.com>2022-09-30 11:41:57 +0000
commitd7f431be507f3f6904a503e5b0ce7fcc23caa326 (patch)
tree63d2f429f3009262b6b2225e71399fd4f74731cc /openstackclient
parente2940eea18e2ad5e40fbee63af7502aa1055938d (diff)
downloadpython-openstackclient-d7f431be507f3f6904a503e5b0ce7fcc23caa326.tar.gz
tests: Remove duplicate FakeImagev1Client
I guess this was defined to avoid a circular import. There are easier ways to do this. Change-Id: Iab215a53691298413ea9d10def792008ab9edbce Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/tests/unit/volume/v1/fakes.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/openstackclient/tests/unit/volume/v1/fakes.py b/openstackclient/tests/unit/volume/v1/fakes.py
index c07af299..2ec40190 100644
--- a/openstackclient/tests/unit/volume/v1/fakes.py
+++ b/openstackclient/tests/unit/volume/v1/fakes.py
@@ -23,12 +23,6 @@ from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes
from openstackclient.tests.unit import utils
-class FakeImagev1Client:
-
- def __init__(self, **kwargs):
- self.images = mock.Mock()
-
-
class FakeVolumev1Client:
def __init__(self, **kwargs):
@@ -72,7 +66,10 @@ class TestVolumev1(utils.TestCommand):
token=fakes.AUTH_TOKEN,
)
- self.app.client_manager.image = FakeImagev1Client(
+ # avoid circular imports
+ from openstackclient.tests.unit.image.v1 import fakes as image_fakes
+
+ self.app.client_manager.image = image_fakes.FakeImagev1Client(
endpoint=fakes.AUTH_URL,
token=fakes.AUTH_TOKEN,
)