Пример #1
0
 def test_legacy_lat_long(self):
     stop1 = Stop(feed=self.feed, stop_id='STOP1')
     stop1.lat = 36.425288
     stop1.lon = -117.133162
     stop1.save()
     stop2 = Stop(feed=self.feed, stop_id='STOP2')
     stop2.lon = -117.14
     stop2.lat = 36.43
     stop2.save()
     self.assertEqual(stop1.point.coords, (-117.133162, 36.425288))
     self.assertEqual(stop1.lat, 36.425288)
     self.assertEqual(stop1.lon, -117.133162)
     self.assertEqual(stop2.point.coords, (-117.14, 36.43))
     self.assertEqual(stop2.lat, 36.43)
     self.assertEqual(stop2.lon, -117.14)
 def test_legacy_lat_long(self):
     stop1 = Stop(feed=self.feed, stop_id='STOP1')
     stop1.lat = 36.425288
     stop1.lon = -117.133162
     stop1.save()
     stop2 = Stop(feed=self.feed, stop_id='STOP2')
     stop2.lon = -117.14
     stop2.lat = 36.43
     stop2.save()
     self.assertEqual(stop1.point.coords, (-117.133162, 36.425288))
     self.assertEqual(stop1.lat, 36.425288)
     self.assertEqual(stop1.lon, -117.133162)
     self.assertEqual(stop2.point.coords, (-117.14, 36.43))
     self.assertEqual(stop2.lat, 36.43)
     self.assertEqual(stop2.lon, -117.14)