def inmemory_composed_keys_test(self): pd = StorageDict(None, [('pk1', 'int'), ('pk2', 'int')], [('val1', 'text')]) pd[0, 1] = '1' pd[1, 1] = '2' pd[2, 0] = '3' pd[3, 1] = '4' self.assertEqual({(0, 1), (1, 1), (2, 0), (3, 1)}, set(pd.keys()))
def inmemory_keys_test(self): pd = StorageDict(None, [('pk1', 'int'), ('pk2', 'int')], [('val1', 'text')]) pd[0] = '1' pd[1] = '2' pd[2] = '3' pd[3] = '4' self.assertEqual({0, 1, 2, 3}, set(pd.keys()))