Merge "Remove duplicate _header() implementations in metadef tests"
This commit is contained in:
commit
92e3106b11
|
@ -25,6 +25,17 @@ class MetadefFunctionalTestBase(functional.FunctionalTest):
|
|||
self.tenant1 = uuids.owner1
|
||||
self.tenant2 = uuids.owner2
|
||||
|
||||
def _headers(self, custom_headers=None):
|
||||
base_headers = {
|
||||
'X-Identity-Status': 'Confirmed',
|
||||
'X-Auth-Token': '932c5c84-02ac-4fe5-a9ba-620af0e2bb96',
|
||||
'X-User-Id': 'f9a41d13-0c13-47e9-bee2-ce4e8bfe958e',
|
||||
'X-Tenant-Id': self.tenant1,
|
||||
'X-Roles': 'admin',
|
||||
}
|
||||
base_headers.update(custom_headers or {})
|
||||
return base_headers
|
||||
|
||||
def assertNamespacesEqual(self, actual, expected):
|
||||
"""Assert two namespace dictionaries are the same."""
|
||||
actual.pop('created_at', None)
|
||||
|
|
|
@ -28,17 +28,6 @@ class TestNamespaces(metadef_base.MetadefFunctionalTestBase):
|
|||
self.api_server.deployment_flavor = 'noauth'
|
||||
self.start_servers(**self.__dict__.copy())
|
||||
|
||||
def _headers(self, custom_headers=None):
|
||||
base_headers = {
|
||||
'X-Identity-Status': 'Confirmed',
|
||||
'X-Auth-Token': '932c5c84-02ac-4fe5-a9ba-620af0e2bb96',
|
||||
'X-User-Id': 'f9a41d13-0c13-47e9-bee2-ce4e8bfe958e',
|
||||
'X-Tenant-Id': self.tenant1,
|
||||
'X-Roles': 'admin',
|
||||
}
|
||||
base_headers.update(custom_headers or {})
|
||||
return base_headers
|
||||
|
||||
def test_namespace_lifecycle(self):
|
||||
# Namespace should not exist
|
||||
path = self._url('/v2/metadefs/namespaces/MyNamespace')
|
||||
|
|
|
@ -28,17 +28,6 @@ class TestMetadefObjects(metadef_base.MetadefFunctionalTestBase):
|
|||
self.api_server.deployment_flavor = 'noauth'
|
||||
self.start_servers(**self.__dict__.copy())
|
||||
|
||||
def _headers(self, custom_headers=None):
|
||||
base_headers = {
|
||||
'X-Identity-Status': 'Confirmed',
|
||||
'X-Auth-Token': '932c5c84-02ac-4fe5-a9ba-620af0e2bb96',
|
||||
'X-User-Id': 'f9a41d13-0c13-47e9-bee2-ce4e8bfe958e',
|
||||
'X-Tenant-Id': self.tenant1,
|
||||
'X-Roles': 'admin',
|
||||
}
|
||||
base_headers.update(custom_headers or {})
|
||||
return base_headers
|
||||
|
||||
def test_metadata_objects_lifecycle(self):
|
||||
# Namespace should not exist
|
||||
path = self._url('/v2/metadefs/namespaces/MyNamespace')
|
||||
|
|
|
@ -28,17 +28,6 @@ class TestNamespaceProperties(metadef_base.MetadefFunctionalTestBase):
|
|||
self.api_server.deployment_flavor = 'noauth'
|
||||
self.start_servers(**self.__dict__.copy())
|
||||
|
||||
def _headers(self, custom_headers=None):
|
||||
base_headers = {
|
||||
'X-Identity-Status': 'Confirmed',
|
||||
'X-Auth-Token': '932c5c84-02ac-4fe5-a9ba-620af0e2bb96',
|
||||
'X-User-Id': 'f9a41d13-0c13-47e9-bee2-ce4e8bfe958e',
|
||||
'X-Tenant-Id': self.tenant1,
|
||||
'X-Roles': 'admin',
|
||||
}
|
||||
base_headers.update(custom_headers or {})
|
||||
return base_headers
|
||||
|
||||
def test_properties_lifecycle(self):
|
||||
# Namespace should not exist
|
||||
path = self._url('/v2/metadefs/namespaces/MyNamespace')
|
||||
|
|
|
@ -28,17 +28,6 @@ class TestMetadefResourceTypes(metadef_base.MetadefFunctionalTestBase):
|
|||
self.api_server.deployment_flavor = 'noauth'
|
||||
self.start_servers(**self.__dict__.copy())
|
||||
|
||||
def _headers(self, custom_headers=None):
|
||||
base_headers = {
|
||||
'X-Identity-Status': 'Confirmed',
|
||||
'X-Auth-Token': '932c5c84-02ac-4fe5-a9ba-620af0e2bb96',
|
||||
'X-User-Id': 'f9a41d13-0c13-47e9-bee2-ce4e8bfe958e',
|
||||
'X-Tenant-Id': self.tenant1,
|
||||
'X-Roles': 'admin',
|
||||
}
|
||||
base_headers.update(custom_headers or {})
|
||||
return base_headers
|
||||
|
||||
def test_metadef_resource_types_lifecycle(self):
|
||||
# Namespace should not exist
|
||||
path = self._url('/v2/metadefs/namespaces/MyNamespace')
|
||||
|
|
|
@ -28,17 +28,6 @@ class TestMetadefTags(metadef_base.MetadefFunctionalTestBase):
|
|||
self.api_server.deployment_flavor = 'noauth'
|
||||
self.start_servers(**self.__dict__.copy())
|
||||
|
||||
def _headers(self, custom_headers=None):
|
||||
base_headers = {
|
||||
'X-Identity-Status': 'Confirmed',
|
||||
'X-Auth-Token': '932c5c84-02ac-4fe5-a9ba-620af0e2bb96',
|
||||
'X-User-Id': 'f9a41d13-0c13-47e9-bee2-ce4e8bfe958e',
|
||||
'X-Tenant-Id': self.tenant1,
|
||||
'X-Roles': 'admin',
|
||||
}
|
||||
base_headers.update(custom_headers or {})
|
||||
return base_headers
|
||||
|
||||
def test_metadata_tags_lifecycle(self):
|
||||
# Namespace should not exist
|
||||
path = self._url('/v2/metadefs/namespaces/MyNamespace')
|
||||
|
|
Loading…
Reference in New Issue