Beispiel #1
0
class WayBillTest(BaseTestCase):
    def set_up(self):
        self.receiver_suite = ReceiverSuite(self.client, self.application)
        self.pointsale_suite = PointSaleSuite(self.client, self.application)
        self.waybill_suite = WayBillTestSuite(self.client, self.application)

    def init_relation_models(self):
        self.receiver = self.receiver_suite.create_test_receiver()
        self.receiver_id = self.receiver.id
        self.point_1 = self.pointsale_suite.create_test_pointsale(name=u"ШШК", address=u"наб. Челны", is_central=True)
        self.point_1_id = self.point_1.id
        self.point_2 = self.pointsale_suite.create_test_pointsale(
            name=u"Одиссей", address=u"Наб. Челны, ул. Беляева, 75"
        )
        self.point_2_id = self.point_2.id
        self.point_3 = self.pointsale_suite.create_test_pointsale(
            name=u"Форт Диалог", address=u"Наб. Челны, Московский пр., 15"
        )
        self.point_3_id = self.point_3.id

        self.application_suite = ApplicationSuite(self.client, self.application)
        self.good_id = self.application_suite.good(u"XXL", "77", "114", 105.0, 86.0)
        self.good_2_id = self.application_suite.good(u"Машинка", None, None, 24.0, 21.0)
        self.good_3_id = self.application_suite.good(u"ЗОЖ", "4", "105", None, 9.5)
        self.good_4_id = self.application_suite.good(u"Мельница", None, None, 15.0, None)

        self.COUNT_GOOD_1 = 10
        self.COUNT_GOOD_4 = 5
        self.COUNT_GOOD_2 = 7

        self.items = [
            {GOOD_ATTR: self.good_id, COUNT_ATTR: self.COUNT_GOOD_1},
            {GOOD_ATTR: self.good_4_id, COUNT_ATTR: self.COUNT_GOOD_4},
        ]

        self.items_2 = [{GOOD_ATTR: self.good_2_id, COUNT_ATTR: self.COUNT_GOOD_2}]
Beispiel #2
0
 def set_up(self):
     self.receiver_suite = ReceiverSuite(self.client, self.application)
     self.pointsale_suite = PointSaleSuite(self.client, self.application)
     self.waybill_suite = WayBillTestSuite(self.client, self.application)