def test_add_multiple_logical_ids(self):
        resource_refs = SupportedResourceReferences()

        resource_refs.add("logicalId1", "property1", "value1")
        resource_refs.add("logicalId2", "property2", "value2")
        resource_refs.add("logicalId3", "property3", "value3")

        self.assertEquals({"property1": "value1"}, resource_refs.get_all("logicalId1"))
        self.assertEquals({"property2": "value2"}, resource_refs.get_all("logicalId2"))
        self.assertEquals({"property3": "value3"}, resource_refs.get_all("logicalId3"))
    def test_add_multiple_logical_ids(self):
        resource_refs = SupportedResourceReferences()

        resource_refs.add("logicalId1", "property1", "value1")
        resource_refs.add("logicalId2", "property2", "value2")
        resource_refs.add("logicalId3", "property3", "value3")

        self.assertEqual({"property1": "value1"}, resource_refs.get_all("logicalId1"))
        self.assertEqual({"property2": "value2"}, resource_refs.get_all("logicalId2"))
        self.assertEqual({"property3": "value3"}, resource_refs.get_all("logicalId3"))
Example #3
0
    def test_add_multiple_properties_to_one_logicalId(self):

        resource_refs = SupportedResourceReferences()

        resource_refs.add("logicalId", "property1", "value1")
        resource_refs.add("logicalId", "property2", "value2")
        resource_refs.add("logicalId", "property3", "value3")

        expected = {
            "property1": "value1",
            "property2": "value2",
            "property3": "value3"
        }

        self.assertEqual(expected, resource_refs.get_all("logicalId"))
    def test_add_multiple_properties_to_one_logicalId(self):

        resource_refs = SupportedResourceReferences()

        resource_refs.add("logicalId", "property1", "value1")
        resource_refs.add("logicalId", "property2", "value2")
        resource_refs.add("logicalId", "property3", "value3")

        expected = {
            "property1": "value1",
            "property2": "value2",
            "property3": "value3"
        }

        self.assertEquals(expected, resource_refs.get_all("logicalId"))
Example #5
0
    def test_get_all_on_non_existent_logical_id(self):
        resource_refs = SupportedResourceReferences()

        resource_refs.add("logicalId", "property", "value1")

        self.assertEqual(None, resource_refs.get_all("some logical id"))
    def test_get_all_on_non_existent_logical_id(self):
        resource_refs = SupportedResourceReferences()

        resource_refs.add("logicalId", "property", "value1")

        self.assertEquals(None, resource_refs.get_all("some logical id"))