Beispiel #1
0
    def test_delete_must_skip_resource_not_present(self):
        id = "SomeResource"
        template = SamTemplate(self.template_dict)

        self.assertIsNone(template.get(id))
        template.delete(id)
        self.assertIsNone(template.get(id))
    def test_delete_must_skip_resource_not_present(self):
        id = "SomeResource"
        template = SamTemplate(self.template_dict)

        self.assertIsNone(template.get(id))
        template.delete(id)
        self.assertIsNone(template.get(id))
Beispiel #3
0
    def test_delete_must_delete_resource(self):
        id = "Function1"
        template = SamTemplate(self.template_dict)

        # Check if it exists
        self.assertIsNotNone(template.get(id))
        # Delete
        template.delete(id)
        # Check that it does not exist
        self.assertIsNone(template.get(id))
    def test_delete_must_delete_resource(self):
        id = "Function1"
        template = SamTemplate(self.template_dict)

        # Check if it exists
        self.assertIsNotNone(template.get(id))
        # Delete
        template.delete(id)
        # Check that it does not exist
        self.assertIsNone(template.get(id))