def put(self): user_id = self.request.arguments['user_id'] info = self.request.arguments['info'] latitude = self.request.arguments['latitude'] longitude = self.request.arguments['longitude'] location_id = self.request.arguments['location_id'] location_name = self.request.arguments['location_name'] person = self.request.arguments['person'] media = media_api.add_image(user_id, info, latitude, longitude, location_id, location_name, person)
def test_add_image(): user_id = 8 info = u'我在这里' latitude = 2.12345678 longitude = 2.12345678 location_id = 1 location_name = u'有树' person = None media = media_api.add_image(user_id, info, latitude, longitude, location_id, location_name, person) print media