Fixes style issues in a v2 controller tests

These are things I found when reviewing
I569e4ab147a16bb019fb3d5f4f6218c75f4a3cca.

Change-Id: Ie9fa3335c47340d6402ef6272139d4fe9f323f97
This commit is contained in:
David Stanek 2016-01-23 02:01:09 +00:00
parent 5599226956
commit 16fe29a038
1 changed files with 6 additions and 12 deletions

View File

@ -112,8 +112,7 @@ class TenantTestCase(unit.TestCase):
self.assertRaises(
exception.ProjectNotFound,
self.tenant_controller.get_all_projects,
context
)
context)
context = copy.deepcopy(_ADMIN_CONTEXT)
context['query_string']['name'] = project['id']
@ -121,8 +120,7 @@ class TenantTestCase(unit.TestCase):
self.assertRaises(
exception.ProjectNotFound,
self.tenant_controller.get_all_projects,
context
)
context)
def test_create_is_domain_project_fails(self):
"""Test that the creation of a project acting as a domain fails."""
@ -133,8 +131,7 @@ class TenantTestCase(unit.TestCase):
exception.ValidationError,
self.tenant_controller.create_project,
_ADMIN_CONTEXT,
project
)
project)
def test_create_project_passing_is_domain_false_fails(self):
"""Test that passing is_domain=False is not allowed."""
@ -145,8 +142,7 @@ class TenantTestCase(unit.TestCase):
exception.ValidationError,
self.tenant_controller.create_project,
_ADMIN_CONTEXT,
project
)
project)
def test_update_is_domain_project_not_found(self):
"""Test that update is_domain project is not allowed in v2."""
@ -158,8 +154,7 @@ class TenantTestCase(unit.TestCase):
self.tenant_controller.update_project,
_ADMIN_CONTEXT,
project['id'],
project
)
project)
def test_delete_is_domain_project_not_found(self):
"""Test that delete is_domain project is not allowed in v2."""
@ -169,8 +164,7 @@ class TenantTestCase(unit.TestCase):
exception.ProjectNotFound,
self.tenant_controller.delete_project,
_ADMIN_CONTEXT,
project['id']
)
project['id'])
def test_list_is_domain_project_not_found(self):
"""Test v2 get_all_projects having projects that act as a domain.