Browse Source

Move load_auth_fixtures()

Move load_auth_fixtures() to the BaseTest class.

Change-Id: I838848114acd8a2e24f89b0cf748eeb19738050f
Ding Jin 9 months ago
parent
commit
e85c6b6193

+ 2
- 0
mixmatch/tests/unit/base.py View File

@@ -64,6 +64,8 @@ class BaseTest(testcase.TestCase):
64 64
         config.post_config()
65 65
         extend.load_extensions()
66 66
 
67
+        self.load_auth_fixtures()
68
+
67 69
     def load_auth_fixtures(self):
68 70
         self.auth = FakeSession(token=uuid.uuid4().hex,
69 71
                                 project=uuid.uuid4().hex)

+ 0
- 4
mixmatch/tests/unit/test_images.py View File

@@ -24,10 +24,6 @@ from mixmatch.model import insert, ResourceMapping
24 24
 class TestImages(base.BaseTest):
25 25
     def setUp(self):
26 26
         super(TestImages, self).setUp()
27
-        # TODO(ericjuma): load_auth_fixtures() should be done in the base
28
-        # class, but may conflict with the other tests which haven't been
29
-        # migrated to these fixtures.
30
-        self.load_auth_fixtures()
31 27
 
32 28
     def _construct_url(self, image_id='', sp=None):
33 29
         if not sp:

+ 0
- 8
mixmatch/tests/unit/test_volumes.py View File

@@ -24,10 +24,6 @@ from mixmatch.tests.unit import samples
24 24
 class TestVolumesV3(base.BaseTest):
25 25
     def setUp(self):
26 26
         super(TestVolumesV3, self).setUp()
27
-        # TODO(knikolla): load_auth_fixtures() should be done in the base
28
-        # class, but may conflict with the other tests which haven't been
29
-        # migrated to these fixtures.
30
-        self.load_auth_fixtures()
31 27
 
32 28
     def _construct_url(self, auth=None, target=None, sp=None,
33 29
                        resource_type='volumes'):
@@ -89,10 +85,6 @@ class TestVolumesV3(base.BaseTest):
89 85
 class TestVolumesV2(base.BaseTest):
90 86
     def setUp(self):
91 87
         super(TestVolumesV2, self).setUp()
92
-        # TODO(knikolla): load_auth_fixtures() should be done in the base
93
-        # class, but may conflict with the other tests which haven't been
94
-        # migrated to these fixtures.
95
-        self.load_auth_fixtures()
96 88
 
97 89
     def _construct_url(self, auth=None, target=None, sp=None):
98 90
         if not sp:

Loading…
Cancel
Save