'Tests that updates can be preformed on nested collections
@since 3.1
@jira_ticket PYTHON-478
@expected_result nested collection is replaced
@test_category object_mapper'

def test_updates(self):

    list_list_initial = [[1, 2, 3], [2, 3, 4], [3, 4, 5]]
    list_list_replacement = [[1, 2, 3], [3, 4, 5]]
    set_tuple_initial = set(((1, 2), (3, 5), (4, 5)))
    map_list_initial = {'key1': ['text1', 'text2', 'text3'], 'key2': ['text1', 'text2', 'text3'], 'key3': ['text1', 'text2', 'text3']}
    map_list_replacement = {'key1': ['text1', 'text2', 'text3'], 'key3': ['text1', 'text2', 'text3']}
    set_tuple_replacement = set(((7, 7), (7, 7), (4, 5)))
    m1 = TestNestedModel.create(list_list=list_list_initial, map_list=map_list_initial, set_tuple=set_tuple_initial)
    m1.list_list = list_list_replacement
    m1.map_list = map_list_replacement
    m1.set_tuple = set_tuple_replacement
    m1.save()
    m2 = TestNestedModel.get(partition=m1.partition)
    self.assertEqual(m2.list_list, list_list_replacement)
    self.assertEqual(m2.map_list, map_list_replacement)
    self.assertEqual(m2.set_tuple, set_tuple_replacement)
