

def test_post_entity_key_string(self):
    request = webapp2.Request.blank(('/datastore/edit/%s' % self.entity4.key()), POST={
        'overflowdatetime|dateprop': str((2 ** 60)),
        'int|intprop': '123',
        'string|stringprop': '',
        'next': 'http://redirect/',
    })
    response = webapp2.Response()
    handler = datastore_viewer.DatastoreEditRequestHandler(request, response)
    self.mox.ReplayAll()
    handler.post(str(self.entity4.key()))
    self.mox.VerifyAll()
    response.assertEqual(302, response.status_int)
    self.assertEqual('http://redirect/', response.location)
    entity = datastore.Get(self.entity4.key())
    self.assertEqual((2 ** 60), entity['dateprop'])
    self.assertEqual(123, entity['intprop'])
    self.assertEqual([10, 11], entity['listprop'])
    self.assertNotIn('stringprop', entity)

dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/devappserver2/admin/datastore_viewer_test.py DatastoreEditRequestHandlerTest.test_post_entity_key_string/VarMisuse@115/160 `self`->`response`