Beispiel #1
0
def test_parser_check_data_helper(data):
    post_yelp = TranslatePostYelp()
    for restaurant in data:
        formatted_data = post_yelp.format_data(restaurant)
        assert formatted_data['name']
        assert formatted_data['address']
        assert formatted_data['phone_number']
        assert formatted_data['rating']
        assert formatted_data['location_lat']
        assert formatted_data['location_long']
        assert formatted_data['image_url']
Beispiel #2
0
def test_parser_check_data_helper(data):
    post_yelp = TranslatePostYelp()
    for restaurant in data:
        formatted_data = post_yelp.format_data(restaurant)
        assert formatted_data['name']
        assert formatted_data['address']
        assert formatted_data['phone_number']
        assert formatted_data['rating']
        assert formatted_data['location_lat']
        assert formatted_data['location_long']
        assert formatted_data['image_url']
Beispiel #3
0
def test_parser_empty():
    with open("happyhour/json-test-files/sample_empty.json") as data_file:
        empty_data = json.load(data_file)
    post_yelp = TranslatePostYelp()
    for restaurant in empty_data:
        formatted_data = post_yelp.format_data(restaurant)
Beispiel #4
0
def test_parser_empty():
    with open("happyhour/json-test-files/sample_empty.json") as data_file:
        empty_data = json.load(data_file)
    post_yelp = TranslatePostYelp()
    for restaurant in empty_data:
        formatted_data = post_yelp.format_data(restaurant)