def _test_put_get_delete(self, reconnect):
    orig_payload = {'value': {'a': u'Aaa', 'b': u'Bee', 'j': u'Jey'}}
    orig_payload_s = repr(orig_payload)
    send_payload_headers = [
      ('Content-type', 'text/x-python'),
      ('Content-length', str(len(orig_payload_s)))
    ]
    
    client = self.connection()
    
    rsp = client.request('PUT', '/entry/a', body=orig_payload_s, headers=send_payload_headers)
    rsp.read() # finish response
    try:
      self.assertTrue(rsp.is_ok, rsp.status)
    except:
      print >> sys.stderr, rsp.body
      raise
    
    client = reconnect(client)
    rsp = client.request('GET', '/entry/a')
    self.assertTrue(rsp.is_ok)
    rsp_payload = eval(rsp.body)
    print rsp_payload
    self.assertTrue('value' in rsp_payload)
    value = rsp_payload['value']
    self.assertEquals(rsp_payload['value']['a'], orig_payload['value']['a'])
    self.assertEquals(rsp_payload['value']['b'], orig_payload['value']['b'])
    self.assertEquals(rsp_payload['value']['j'], orig_payload['value']['j'])
    
    client.disconnect()
dataset/ETHPy150Open rsms/smisk/lib/smisk/test/live/key_value_store_example/__init__.py/KVSExample._test_put_get_delete/original