'tests that updating to a smaller list results in an insert statement'

def test_shrinking_list_update(self):

    c = ListUpdateClause('s', [1, 2, 3], previous=[1, 2, 3, 4])
    c._analyze()
    c.set_context_id(0)
    self.assertEqual(c._assignments, [1, 2, 3])
    self.assertIsNone(c._append)
    self.assertIsNone(c._prepend)
    self.assertEqual(c.get_context_size(), 1)
    self.assertEqual(str(c), '"s"    =    %(0)s')
    ctx = {}
    c.update_context(ctx)
    self.assertEqual(ctx, {'0': [1, 2, 3]})
