示例#1
0
    def get_news_json(self):
        # Note: The news is not cached because we want the most recent
        #       headlines.

        return external._lookup_nyt(self.name)
示例#2
0
文件: index.py 项目: cdxr/CitySketch
def nyt_json():
    city_name = request.args.get('city')
    country_name = request.args.get('country')

    result = external._lookup_nyt(city_name, country_name)
    return jsonify({'nyt-json': result})
示例#3
0
def test_nyt():
    response = external._lookup_nyt("New York", country_name = "United States")
    assert(response['status'] == 'OK') # test_nyt 1