def test_render_groups(self): # ensure that a given rule set is converted to the equivalent security # group hierachy rs = RuleSet() for flat in self.flat: rs.add(Rule(flat)) self.assertEqual(self.groups, rs.render_groups())
def test_add_rule(self): # ensure that rules are coerced to Rules rs = RuleSet() rs.add(dict(chain(self.rule_params.items(), self.cidrsrc_param.items()))) self.assertIsInstance(rs.pop(), Rule)
def test_add_rule(self): # ensure that rules are coerced to Rules rs = RuleSet() rs.add( dict(chain(self.rule_params.items(), self.cidrsrc_param.items()))) self.assertIsInstance(rs.pop(), Rule)