def test_simple_hash(self):
        h = self.db.Hash('hash_obj')
        h.clear()

        h['k1'] = 'v1'
        h.update({'k2': 'v2', 'k3': 'v3'})
        self.assertEqual(h.as_dict(), {'k1': 'v1', 'k2': 'v2', 'k3': 'v3'})

        self.assertEqual(h['k2'], 'v2')
        self.assertIsNone(h['k4'])
        self.assertTrue(h in 'k2')
        self.assertFalse('k4' in h)

        del h['k2']
        del h['k4']
        self.assertEqual(sorted(h.keys()), ['k1', 'k3'])
        self.assertEqual(sorted(h.values()), ['v1', 'v3'])
        self.assertEqual(len(h), 2)

        self.assertEqual(h['k1', 'k2', 'k3'], ['v1', None, 'v3'])

        self.assertEqual(h.incr('counter'), 1)
        self.assertEqual(h.incr('counter', 3), 4)
dataset/ETHPy150Open coleifer/walrus/walrus/tusks/helpers.py/TestHelper.test_simple_hash/swapped operands of `in`