summaryrefslogtreecommitdiffstats
path: root/snaps/domain/test/stack_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'snaps/domain/test/stack_tests.py')
-rw-r--r--snaps/domain/test/stack_tests.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/snaps/domain/test/stack_tests.py b/snaps/domain/test/stack_tests.py
index f816ef8..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):
@@ -39,14 +48,22 @@ class ResourceDomainObjectTests(unittest.TestCase):
"""
def test_construction_positional(self):
- resource = Resource('foo', 'bar')
+ resource = Resource('res_name', 'foo', 'bar', 'status', 'reason')
+ self.assertEqual('res_name', resource.name)
self.assertEqual('foo', resource.type)
self.assertEqual('bar', resource.id)
+ self.assertEqual('status', resource.status)
+ self.assertEqual('reason', resource.status_reason)
def test_construction_named(self):
- resource = Resource(resource_id='bar', resource_type='foo')
+ resource = Resource(
+ status_reason=None, status=None, resource_id='bar',
+ resource_type='foo', name='res_name')
+ self.assertEqual('res_name', resource.name)
self.assertEqual('foo', resource.type)
self.assertEqual('bar', resource.id)
+ self.assertIsNone(resource.status)
+ self.assertIsNone(resource.status_reason)
class OutputDomainObjectTests(unittest.TestCase):