Esempio n. 1
0
    def create_delivery(self, delivery_point=None, delivery_point_name="One delivery point", date=None):
        if not delivery_point:
            delivery_point = self.create_delivery_point(name=delivery_point_name)

        if not date:
            date = timezone.now()

        delivery = Delivery(date=date, delivery_point=delivery_point)
        delivery.save()
        return delivery
Esempio n. 2
0
 def test_has_an_explicit__str__(self):
     dp = self.create_delivery_point(name="Point")
     d = Delivery(date=timezone.now(), delivery_point=dp)
     self.assertNotEquals(d.__str__(), 'Delivery object')