Skip to content

Commit

Permalink
ensure test parameter order is consistent (sets don't guarantee order)
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Nov 10, 2022
1 parent 900983e commit aaf0021
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_expand_ports_list(rule, expected):
assert ec2_security_group_module.expand_ports_list(rule) == expected


@pytest.mark.parametrize("source_type", ec2_security_group_module.SOURCE_TYPES_ALL)
@pytest.mark.parametrize("source_type", sorted(ec2_security_group_module.SOURCE_TYPES_ALL))
def test_strip_rule_source(source_type):
rule = {source_type: sentinel.SOURCE_VALUE}
assert ec2_security_group_module._strip_rule(rule) == {}
Expand All @@ -184,7 +184,7 @@ def test_strip_rule_source(source_type):
assert rule == {source_type: sentinel.SOURCE_VALUE, "sentinel": sentinel.SENTINEL_VALUE}


@pytest.mark.parametrize("port_type", ec2_security_group_module.PORT_TYPES_ALL)
@pytest.mark.parametrize("port_type", sorted(ec2_security_group_module.PORT_TYPES_ALL))
def test_strip_rule_source(port_type):
rule = {port_type: sentinel.PORT_VALUE}
assert ec2_security_group_module._strip_rule(rule) == {}
Expand Down

0 comments on commit aaf0021

Please sign in to comment.