def read(_key): result = data.getDataFromKey(_key) return result["v"]
def test_updateValue(self): data.insertData('g1', 'hss') data.updateValue('g', "halo") res = data.getDataFromKey('g') #print("test_updateDate : ",res) self.assertEqual(res["v"], "halo")
def test_update_if_i_am_primary(self): value = "14" res = rw.update(self.key, value, self.ip) self.assertIsNotNone(res) result = data.getDataFromKey(self.key) self.assertEqual(result["v"], value)
def test_getDataFromKey(self): data.insertData('p1', 'hs') res = data.getDataFromKey('p') self.assertEqual(res['v'], 'hs')