Пример #1
0
 def test_new_keys_override_old_keys(self):
     self.execute([
         RecordResourceValue(
             resource_type='lambda_function',
             resource_name='myfunction',
             name='key1',
             value='OLD',
         ),
         RecordResourceValue(
             resource_type='lambda_function',
             resource_name='myfunction',
             name='key1',
             value='NEW',
         )
     ])
     assert self.executor.resource_values == [{
         'name': 'myfunction',
         'resource_type': 'lambda_function',
         'key1': 'NEW',
     }]
Пример #2
0
 def test_can_aggregate_multiple_resource_values(self):
     self.execute([
         RecordResourceValue(
             resource_type='lambda_function',
             resource_name='myfunction',
             name='key1',
             value='value1',
         ),
         RecordResourceValue(
             resource_type='lambda_function',
             resource_name='myfunction',
             name='key2',
             value='value2',
         )
     ])
     assert self.executor.resource_values == [{
         'name': 'myfunction',
         'resource_type': 'lambda_function',
         'key1': 'value1',
         'key2': 'value2',
     }]
Пример #3
0
 def test_can_record_value_directly(self):
     self.execute([
         RecordResourceValue(
             resource_type='lambda_function',
             resource_name='myfunction',
             name='myfunction_arn',
             value='arn:foo',
         )
     ])
     assert self.executor.resource_values == [{
         'name': 'myfunction',
         'resource_type': 'lambda_function',
         'myfunction_arn': 'arn:foo',
     }]