def test_export_fare_attributes_minimal(self): Fare.objects.create( feed=self.feed, fare_id='p', price='1.25', currency_type='USD', payment_method=0, transfers=0) fare = Fare.objects.get() fare_txt = Fare.export_txt(self.feed) self.assertEqual(fare_txt, """\ fare_id,price,currency_type,payment_method,transfers p,%s,USD,0,0 """ % fare.price)
def test_export_fare_attributes_unlimited_transfers(self): Fare.objects.create( feed=self.feed, fare_id='p', price='1.25', currency_type='USD', payment_method=0, transfers=None, transfer_duration=3600) fare = Fare.objects.get() fare_txt = Fare.export_txt(self.feed) self.assertEqual(fare_txt, """\ fare_id,price,currency_type,payment_method,transfers,transfer_duration p,%s,USD,0,,3600 """ % fare.price)
def test_export_fare_attributes_minimal(self): Fare.objects.create(feed=self.feed, fare_id='p', price='1.25', currency_type='USD', payment_method=0, transfers=0) fare = Fare.objects.get() fare_txt = Fare.export_txt(self.feed) self.assertEqual( fare_txt, """\ fare_id,price,currency_type,payment_method,transfers p,%s,USD,0,0 """ % fare.price)
def test_export_fare_attributes_unlimited_transfers(self): Fare.objects.create(feed=self.feed, fare_id='p', price='1.25', currency_type='USD', payment_method=0, transfers=None, transfer_duration=3600) fare = Fare.objects.get() fare_txt = Fare.export_txt(self.feed) self.assertEqual( fare_txt, """\ fare_id,price,currency_type,payment_method,transfers,transfer_duration p,%s,USD,0,,3600 """ % fare.price)