def get_businesses_for_markers(): """ Gets businesses from Yelp API and passes JSON to create map markers :return: JSON of list of YelpBusiness objects """ location = 'San Francisco' businesses = build_dict_for_markers(location) return jsonify(businesses)
def test_build_dict_for_markers(self): """ Can we create dictionary? """ location = "San Francisco" markers = build_dict_for_markers(location) self.assertIsInstance(markers, dict)