Example #1
0
    def test_AllReturnStatuses(self):
        return_ = PackageObjectMother.CreateConfirmedReturn()

        statuses = Package.FindAllReturnStatuses()

        for status in statuses:
            return_.Status = status
            self.assertEqual(return_.Status, status)
Example #2
0
    def test_BadReturnStateChangeRaisesException(self):
        return_ = PackageObjectMother.CreateConfirmedReturn()

        with self.assertRaises(ValueError):
            return_.Status = ""

        with self.assertRaises(ValueError):
            return_.Status = 13

        with self.assertRaises(ValueError):
            return_.Status = "zły stan, nie ma go"
Example #3
0
 def test_CreateAllObjectsFromObjectMother(self):
     p = PackageObjectMother.CreatePackageNoPickupsNoReturn()
     p = PackageObjectMother.CreatePackageManyPickupNoReturn()
     p = PackageObjectMother.CreatePackageManyPickupPackedNoReturn()
     p = PackageObjectMother.CreateDeliveredPackageManyPickupPackedNoReturn(
     )
     p = PackageObjectMother.CreatePackageManyPickupPackedUnconfirmedReturn(
     )
     p = PackageObjectMother.CreatePackageManyPickupPackedConfirmedReturn()
     p = PackageObjectMother.CreateUnpackedPickups()
     p = PackageObjectMother.CreatePackedPickups()
     p = PackageObjectMother.CreateUnconfirmedReturn()
     p = PackageObjectMother.CreateConfirmedReturn()