def test_parse_resource_references_with_empty_property(self): # Just a dot at the end! This is equivalent of no property input = "LogicalId." expected = (None, None) self.assertEqual(expected, Action._parse_resource_reference(input))
def test_parse_resource_references_with_multiple_properties(self): input = "LogicalId.Property1.Property2.Property3" expected = ("LogicalId", "Property1.Property2.Property3") self.assertEqual(expected, Action._parse_resource_reference(input))
def test_parse_resource_references_with_other_special_characters(self): input = "some logical id . some value" expected = ("some logical id ", " some value") self.assertEqual(expected, Action._parse_resource_reference(input))
def test_parse_resource_references_not_string(self): input = {"not a": "string"} expected = (None, None) self.assertEqual(expected, Action._parse_resource_reference(input))
def test_parse_resource_references_with_one_property(self): input = "LogicalId.Property" expected = ("LogicalId", "Property") self.assertEqual(expected, Action._parse_resource_reference(input))
def test_parse_resource_references_with_empty_logical_id(self): # Just a dot at the beginning! This is equivalent of no LogicalId input = ".Property" expected = (None, None) self.assertEqual(expected, Action._parse_resource_reference(input))
def test_parse_resource_references_with_no_property(self): input = "LogicalId" expected = (None, None) self.assertEqual(expected, Action._parse_resource_reference(input))