def METHOD_NAME(self):
    # Issue 5754
    d = {}
    key = 'key'
    encodedkey = key.encode('utf-8')
    s = shelve.Shelf(d, writeback=True)
    s[key] = [1]
    p1 = d[encodedkey]  # Will give a KeyError if backing store not updated
    s['key'].append(2)
    s.close()
    p2 = d[encodedkey]
    self.assertNotEqual(p1, p2)  # Write creates new object in store