def test_answer_with_no_status(self): data = {"data":"good data"} true_data = { "status":400 } real_data = get_data(data) self.assertEqual(true_data["status"],real_data["status"])
def test_answer_with_code(self): data = {"code":200,"data":"good data"} true_data = { "status":data["code"], "data":data["data"] } real_data = get_data(data) self.assertEqual(true_data,real_data)
def messages_create(data): response = main_post(data,settings.LEBOWSKI['URLS']['MESSAGES']['CREATE']) return get_data(response)
def places_create(data): response = main_post(data,settings.LEBOWSKI['URLS']['PLACES']['CREATE']) return get_data(response)
def users_create(data): response = main_post(data,settings.LEBOWSKI['URLS']['USERS']['CREATE']) return get_data(response)
def messages_create(data): response = main_post(data, settings.LEBOWSKI['URLS']['MESSAGES']['CREATE']) return get_data(response)
def places_create(data): response = main_post(data, settings.LEBOWSKI['URLS']['PLACES']['CREATE']) return get_data(response)
def users_create(data): response = main_post(data, settings.LEBOWSKI['URLS']['USERS']['CREATE']) return get_data(response)