def test_parse_security_group(values): """Parse out security group entries""" values.return_value = 'g1' assert { '': ['g1'] } == _generate_security_groups('default_ec2_securitygroups') values.return_value = 'g1,g2' assert { '': ['g1', 'g2'] } == _generate_security_groups('default_ec2_securitygroups')
def test_parse_security_group_dict(mock_keys): """Validate security groups are handled properly if dictionary is in dyanmic config""" assert { '': ['g3'] } == _generate_security_groups('default_elb_securitygroups')