@@ -25,7 +25,7 @@ def test_with_no_properties(self):
25
25
with self .assertRaises (ApplicationError ) as cm :
26
26
ResourceParser .parse (template , account_config )
27
27
28
- self .assertEqual (required_property_error ('Properties' , 'ResourceA' ), str (cm .exception ))
28
+ self .assertEqual (required_property_error ('Properties' , 'Resources. ResourceA' ), str (cm .exception ))
29
29
30
30
@mock_node_evaluator_setup ()
31
31
def test_with_no_action (self ):
@@ -42,7 +42,7 @@ def test_with_no_action(self):
42
42
with self .assertRaises (ApplicationError ) as cm :
43
43
ResourceParser .parse (template , account_config )
44
44
45
- self .assertEqual (required_property_error ('Action' , 'ResourceA.Properties' ), str (cm .exception ))
45
+ self .assertEqual (required_property_error ('Action' , 'Resources. ResourceA.Properties' ), str (cm .exception ))
46
46
47
47
@mock_node_evaluator_setup ()
48
48
def test_with_no_function_name (self ):
@@ -59,7 +59,7 @@ def test_with_no_function_name(self):
59
59
with self .assertRaises (ApplicationError ) as cm :
60
60
ResourceParser .parse (template , account_config )
61
61
62
- self .assertEqual (required_property_error ('FunctionName' , 'ResourceA.Properties' ), str (cm .exception ))
62
+ self .assertEqual (required_property_error ('FunctionName' , 'Resources. ResourceA.Properties' ), str (cm .exception ))
63
63
64
64
@mock_node_evaluator_setup ()
65
65
def test_with_no_principal (self ):
@@ -76,7 +76,7 @@ def test_with_no_principal(self):
76
76
with self .assertRaises (ApplicationError ) as cm :
77
77
ResourceParser .parse (template , account_config )
78
78
79
- self .assertEqual (required_property_error ('Principal' , 'ResourceA.Properties' ), str (cm .exception ))
79
+ self .assertEqual (required_property_error ('Principal' , 'Resources. ResourceA.Properties' ), str (cm .exception ))
80
80
81
81
@mock_node_evaluator_setup ()
82
82
def test_with_unsupported_function_in_unused_property (self ):
@@ -148,30 +148,30 @@ def assert_invalid_type(self, template, path, expected_type, invalid_value):
148
148
def test_invalid_action_type (self ):
149
149
invalid_value = ['Invalid' ]
150
150
template = _build_lambda_permissions_policy (action = invalid_value )
151
- self .assert_invalid_type (template , "ResourceA.Properties.Action" , 'string' , invalid_value )
151
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.Action" , 'string' , invalid_value )
152
152
153
153
@mock_node_evaluator_setup ()
154
154
def test_invalid_function_name_type (self ):
155
155
invalid_value = ['Invalid' ]
156
156
template = _build_lambda_permissions_policy (function_name = invalid_value )
157
- self .assert_invalid_type (template , "ResourceA.Properties.FunctionName" , 'string' , invalid_value )
157
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.FunctionName" , 'string' , invalid_value )
158
158
159
159
def test_invalid_principal_type (self ):
160
160
invalid_value = ['Invalid' ]
161
161
template = _build_lambda_permissions_policy (principal = invalid_value )
162
- self .assert_invalid_type (template , "ResourceA.Properties.Principal" , 'string' , invalid_value )
162
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.Principal" , 'string' , invalid_value )
163
163
164
164
@mock_node_evaluator_setup ()
165
165
def test_invalid_source_arn_type (self ):
166
166
invalid_value = ['Invalid' ]
167
167
template = _build_lambda_permissions_policy (source_arn = invalid_value )
168
- self .assert_invalid_type (template , "ResourceA.Properties.SourceArn" , 'string' , invalid_value )
168
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.SourceArn" , 'string' , invalid_value )
169
169
170
170
@mock_node_evaluator_setup ()
171
171
def test_invalid_source_account_type (self ):
172
172
invalid_value = ['Invalid' ]
173
173
template = _build_lambda_permissions_policy (source_account = invalid_value )
174
- self .assert_invalid_type (template , "ResourceA.Properties.SourceAccount" , 'string' , invalid_value )
174
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.SourceAccount" , 'string' , invalid_value )
175
175
176
176
177
177
class WhenParsingALambdaPermissionsPolicy (unittest .TestCase ):
@@ -526,7 +526,7 @@ def test_with_no_properties(self):
526
526
with self .assertRaises (ApplicationError ) as cm :
527
527
ResourceParser .parse (template , account_config )
528
528
529
- self .assertEqual (required_property_error ('Properties' , 'ResourceA' ), str (cm .exception ))
529
+ self .assertEqual (required_property_error ('Properties' , 'Resources. ResourceA' ), str (cm .exception ))
530
530
531
531
@mock_node_evaluator_setup ()
532
532
def test_with_no_action (self ):
@@ -543,7 +543,7 @@ def test_with_no_action(self):
543
543
with self .assertRaises (ApplicationError ) as cm :
544
544
ResourceParser .parse (template , account_config )
545
545
546
- self .assertEqual (required_property_error ('Action' , 'ResourceA.Properties' ), str (cm .exception ))
546
+ self .assertEqual (required_property_error ('Action' , 'Resources. ResourceA.Properties' ), str (cm .exception ))
547
547
548
548
@mock_node_evaluator_setup ()
549
549
def test_with_no_layer_version_arn (self ):
@@ -560,7 +560,7 @@ def test_with_no_layer_version_arn(self):
560
560
with self .assertRaises (ApplicationError ) as cm :
561
561
ResourceParser .parse (template , account_config )
562
562
563
- self .assertEqual (required_property_error ('LayerVersionArn' , 'ResourceA.Properties' ), str (cm .exception ))
563
+ self .assertEqual (required_property_error ('LayerVersionArn' , 'Resources. ResourceA.Properties' ), str (cm .exception ))
564
564
565
565
@mock_node_evaluator_setup ()
566
566
def test_with_no_principal (self ):
@@ -577,7 +577,7 @@ def test_with_no_principal(self):
577
577
with self .assertRaises (ApplicationError ) as cm :
578
578
ResourceParser .parse (template , account_config )
579
579
580
- self .assertEqual (required_property_error ('Principal' , 'ResourceA.Properties' ), str (cm .exception ))
580
+ self .assertEqual (required_property_error ('Principal' , 'Resources. ResourceA.Properties' ), str (cm .exception ))
581
581
582
582
583
583
def _build_lambda_layer_version_permissions_policy (action = 'lambda:GetLayerVersion' ,
@@ -612,25 +612,25 @@ def assert_invalid_type(self, template, path, expected_type, invalid_value):
612
612
def test_invalid_action_type (self ):
613
613
invalid_value = ['Invalid' ]
614
614
template = _build_lambda_layer_version_permissions_policy (action = invalid_value )
615
- self .assert_invalid_type (template , "ResourceA.Properties.Action" , "string" , invalid_value )
615
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.Action" , "string" , invalid_value )
616
616
617
617
@mock_node_evaluator_setup ()
618
618
def test_invalid_layer_version_arn_type (self ):
619
619
invalid_value = ['Invalid' ]
620
620
template = _build_lambda_layer_version_permissions_policy (layer_version_arn = invalid_value )
621
- self .assert_invalid_type (template , "ResourceA.Properties.LayerVersionArn" , "string" , invalid_value )
621
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.LayerVersionArn" , "string" , invalid_value )
622
622
623
623
@mock_node_evaluator_setup ()
624
624
def test_invalid_principal_type (self ):
625
625
invalid_value = ['Invalid' ]
626
626
template = _build_lambda_layer_version_permissions_policy (principal = invalid_value )
627
- self .assert_invalid_type (template , "ResourceA.Properties.Principal" , "string" , invalid_value )
627
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.Principal" , "string" , invalid_value )
628
628
629
629
@mock_node_evaluator_setup ()
630
630
def test_invalid_organization_id_type (self ):
631
631
invalid_value = ['Invalid' ]
632
632
template = _build_lambda_layer_version_permissions_policy (organization_id = invalid_value )
633
- self .assert_invalid_type (template , "ResourceA.Properties.OrganizationId" , "string" , invalid_value )
633
+ self .assert_invalid_type (template , "Resources. ResourceA.Properties.OrganizationId" , "string" , invalid_value )
634
634
635
635
@mock_node_evaluator_setup ()
636
636
def test_with_unsupported_function_in_unused_property (self ):
0 commit comments