diff options
author | spisarski <s.pisarski@cablelabs.com> | 2018-03-06 14:52:31 -0700 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2018-03-07 13:13:50 -0700 |
commit | e4563aec1eb8f98e5e42fe513918432eddadcd37 (patch) | |
tree | 6feadc19d711366bf84dbac59f27c5b219667102 /snaps/domain/test/stack_tests.py | |
parent | 8a7e0ddf0ddc631a1271319cd97f43773012e3ca (diff) |
Updated stack tests to only use an admin user when necessary.
Changed super test class OSIntegrationTestCase to allow subclasses
to set the user roles when required. For all heat stack test,
the user role will always be 'heat_stack_owner'. 'admin' will be
used for tests requiring this role (i.e. heat template creates
flavors)
JIRA: SNAPS-268
Change-Id: I0ec01cfea6297547a6a158eec8e5c69af6d6c7d7
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/domain/test/stack_tests.py')
-rw-r--r-- | snaps/domain/test/stack_tests.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/snaps/domain/test/stack_tests.py b/snaps/domain/test/stack_tests.py index 21e31d2..2ad690a 100644 --- a/snaps/domain/test/stack_tests.py +++ b/snaps/domain/test/stack_tests.py @@ -23,14 +23,23 @@ class StackDomainObjectTests(unittest.TestCase): """ def test_construction_positional(self): - stack = Stack('name', 'id') + stack = Stack( + 'name', 'id', 'stack_proj_id', 'fine', 'good') self.assertEqual('name', stack.name) self.assertEqual('id', stack.id) + self.assertEqual('stack_proj_id', stack.stack_project_id) + self.assertEqual('fine', stack.status) + self.assertEqual('good', stack.status_reason) def test_construction_named(self): - stack = Stack(stack_id='id', name='name') + stack = Stack( + stack_id='id', name='name', stack_project_id='stack_proj_id', + status='fine', status_reason='good') self.assertEqual('name', stack.name) self.assertEqual('id', stack.id) + self.assertEqual('stack_proj_id', stack.stack_project_id) + self.assertEqual('fine', stack.status) + self.assertEqual('good', stack.status_reason) class ResourceDomainObjectTests(unittest.TestCase): |