def test_city_desc(): response = get_city_description("New York", "United States") assert((response['url'] != None and response['title'] != None and \ response['text'] != None) == True) # test_city_desc test #1 response = get_city_description("Paris", "France") assert((response['url'] != None and response['title'] != None and \ response['text'] != None) == True) # test_city_desc test #1
def test_city_desc(): response = get_city_description("New York", "United States") assert ( response["url"] != None and response["title"] != None and response["text"] != None ) == True # test_city_desc test #1 response = get_city_description("Paris", "France") assert ( response["url"] != None and response["title"] != None and response["text"] != None ) == True # test_city_desc test #1
def city_description(): city_name = request.args.get('city') country_name = request.args.get('country') response = city_desc.get_city_description(city_name, country_name) return json.dumps(response)
def city_description(): city_name = request.args.get('city') country_name = request.args.get('country') response = city_desc.get_city_description(city_name, country_name) # generates the most accurate article return json.dumps(response)