Example #1
0
    def test_remove_child_properties(self):
        """
        Test remove child properties
        """
        list_name = 'listname'
        properties = {list_name: 'Something', 'another': 'thing'}
        lr = ListRelationship(list_name)
        post_props = lr.remove_child_resource_properties(properties)
        self.assertNotEqual(properties, post_props)
        self.assertEqual({'another': 'thing'}, post_props)

        # Just make sure that it still works when the properties aren't there
        part2 = lr.remove_child_resource_properties(post_props)
        self.assertEqual(part2, post_props)
        self.assertNotEqual(id(part2), id(post_props))