Exemple #1
0
 def test_good_google_location_and_yelp(self):
   place = Place()
   place.name = "Whole Foods"
   place.location = '1240 Yale St, Santa Monica, CA 90404'
   place.save()
   self.assertEqual(place.yelp_id, 'hdQJrF3Fw_KrEaDywC3tyg')
   self.assertEqual(len(Place.objects.all()), 1)
Exemple #2
0
 def test_bad_google_location(self):
   place = Place()
   place.name = "test place"
   place.location = ''
   place.save()
   self.assertEqual(len(Place.objects.all()), 0)