|
15 | 15 | ("Equal string and integer", [1, "1"], 1),
|
16 | 16 | ("Equal string and boolean", [True, "true"], 1),
|
17 | 17 | ("Equal string and number", [1.0, "1.0"], 1),
|
18 |
| - ("Not equal string and integer", [1, "1.1"], 0), |
19 |
| - ("Not equal string and boolean", [True, "True"], 0), |
| 18 | + ("Not equal string and integer", [1, "1.1"], 1), |
| 19 | + ("Not equal string and boolean", [True, "True"], 1), |
20 | 20 | ("No error on bad type", {"true": True}, 0),
|
21 | 21 | ("No error on bad length", ["a", "a", "a"], 0),
|
| 22 | + ("No with string and account id", ["A", {"Ref": "AWS::AccountId"}], 0), |
| 23 | + ("No with string and account id", [{"Ref": "AWS::AccountId"}, "A"], 0), |
22 | 24 | ],
|
23 | 25 | )
|
24 | 26 | def test_names(name, instance, num_of_errors):
|
25 | 27 | rule = EqualsIsUseful()
|
26 | 28 | validator = CfnTemplateValidator({})
|
27 | 29 | assert (
|
28 | 30 | len(list(rule.equals_is_useful(validator, {}, instance, {}))) == num_of_errors
|
29 |
| - ), f"Expected {num_of_errors} errors for {name}" |
| 31 | + ), f"Expected {num_of_errors} errors for {name} and {instance}" |
0 commit comments