def test_consistent_order_backward(self): a = SecurityGroup(None, name="test", description="test") b = SecurityGroup(None, name="test", description="test") b.add_dependency(a) c = SecurityGroup(None, name="test", description="test") c.add_dependency(b) d = SecurityGroup(None, name="test", description="test") d.add_dependency(c) dw = dependencies.DependencyMap(d, tips_first=True) self.assertEqual(list(dw.all()), [d, c, b, a])
def test_consistent_order_forward(self): a = SecurityGroup(None, name="test", description="test") b = SecurityGroup(None, name="test", description="test") b.add_dependency(a) c = SecurityGroup(None, name="test", description="test") c.add_dependency(b) d = SecurityGroup(None, name="test", description="test") d.add_dependency(c) dw = dependencies.DependencyMap(d) self.assertEqual(list(dw.all()), [a, b, c, d])
class TestResource(unittest.TestCase): def setUp(self): self.resource = SecurityGroup(None, name="test") def test_identifier(self): self.assertTrue(isinstance( self.resource.identifier(), serializers.Context, )) def test_properties(self): self.assertTrue(isinstance( self.resource.get_property("Foo"), serializers.Property, ))
def setUp(self): self.resource = SecurityGroup(None, name="test")
def setUp(self): self.resource = SecurityGroup(None, name="test") self.runner = mock.Mock()