示例#1
0
 def test_its_property_contains_key_property_is_property_list(self):
     step = MockedStep()
     step.context.stash = MockedTerraformPropertyList()
     its_property_contains_key(step=step,
                               property='something',
                               key="key",
                               resourcelist=MockedTerraformResourceList)
     self.assertEqual(step.state, 'skipped')
示例#2
0
 def test_its_property_contain_something_property_can_not_be_found(self):
     step = MockedStep()
     step.context.stash = MockedTerraformResourceList()
     step.sentence = 'When its .. contains Name'
     its_property_contains_key(step=step,
                               property="???",
                               key="Name",
                               resourcelist=MockedTerraformResourceList)
     self.assertEqual(step.state, 'skipped')
示例#3
0
 def test_its_property_contains_key_property_key_is_found(self):
     step = MockedStep()
     step.context.stash = MockedTerraformResourceList()
     step.sentence = 'When its something contains key'
     its_property_contains_key(step=step,
                               property='tags',
                               key="key",
                               resourcelist=MockedTerraformResourceList)
     self.assertEqual(step.context.stash.__class__,
                      MockedTerraformPropertyList)
示例#4
0
 def test_its_property_contains_key_resource_list(self):
     step = MockedStep()
     step.context.stash.resource_list = None
     self.assertIsNone(
         its_property_contains_key(step, 'something', 'not_important'))