diff options
Diffstat (limited to 'snaps/domain/test/vm_inst_tests.py')
-rw-r--r-- | snaps/domain/test/vm_inst_tests.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/snaps/domain/test/vm_inst_tests.py b/snaps/domain/test/vm_inst_tests.py index d293373..e288366 100644 --- a/snaps/domain/test/vm_inst_tests.py +++ b/snaps/domain/test/vm_inst_tests.py @@ -23,26 +23,30 @@ class VmInstDomainObjectTests(unittest.TestCase): """ def test_construction_positional(self): - vm_inst = VmInst('name', 'id', '456', '123', dict(), 'kp-name', list()) + vm_inst = VmInst('name', 'id', '456', '123', dict(), 'kp-name', + ['foo', 'bar'], ['123', '456']) self.assertEqual('name', vm_inst.name) self.assertEqual('id', vm_inst.id) self.assertEqual('456', vm_inst.image_id) self.assertEqual('123', vm_inst.flavor_id) self.assertEqual(dict(), vm_inst.networks) self.assertEqual('kp-name', vm_inst.keypair_name) - self.assertEqual(list(), vm_inst.sec_grp_names) + self.assertEqual(['foo', 'bar'], vm_inst.sec_grp_names) + self.assertEqual(['123', '456'], vm_inst.volume_ids) def test_construction_named(self): - vm_inst = VmInst(sec_grp_names=list(), networks=dict(), inst_id='id', - name='name', flavor_id='123', image_id='456', - keypair_name='kp-name') + vm_inst = VmInst( + volume_ids=['123', '456'], sec_grp_names=['foo', 'bar'], + networks=dict(), inst_id='id', name='name', flavor_id='123', + image_id='456', keypair_name='kp-name') self.assertEqual('name', vm_inst.name) self.assertEqual('id', vm_inst.id) self.assertEqual('456', vm_inst.image_id) self.assertEqual('123', vm_inst.flavor_id) self.assertEqual(dict(), vm_inst.networks) self.assertEqual('kp-name', vm_inst.keypair_name) - self.assertEqual(list(), vm_inst.sec_grp_names) + self.assertEqual(['foo', 'bar'], vm_inst.sec_grp_names) + self.assertEqual(['123', '456'], vm_inst.volume_ids) class FloatingIpDomainObjectTests(unittest.TestCase): |