Beispiel #1
0
    def test_invoice(self):
        inv = Invoice()
        inv.invoice_number = '59128'
        inv.customer = 'Saks Fifth Avenue'
        inv.store_number = '0689'
        inv.tracking_number = '1ZW885Y21349335867'
        inv.ship_date = datetime(2015, 12, 15)
        inv.discount_code = '05'
        inv.discount = 0
        inv.sscc_number = '803276200000591289'
        inv.po_number = '6163130'
        inv.dept_number = '0162'
        inv.dc_number = '0185'
        inv.total_cost = 4575
        inv.total_qty = 7
        inv.address1 = 'ONE WALDENBOOKS DRIVE'
        inv.address2 = 'DC# 185 STORE# 689'
        inv.city_state_zip = 'LA VERGNE, TN 37086'
        p1 = Item()
        p1.style = 'CB1779- -Y-02-42.0'
        p1.upc = '8032762238027'
        p1.qty = 1
        p1.cost = 795.0
        inv.items.append(p1)
        #p2 = Product('OB1234- -Y-02-0')

        self.test_invoices.append(inv)
Beispiel #2
0
def test_get_store_info_with_valid_destination():
    mock_destination_log()
    inv = Invoice()
    inv.customer = 'TestCust'
    inv = get_store_info(inv, 'TestDest', mock_settings())
    assert inv.store_number == '0001'
    assert inv.dc_number == '0123'
    assert inv.store_name == 'TestName'
def test_get_store_info_with_valid_destination():
    mock_destination_log()
    inv = Invoice()
    inv.customer = 'TestCust'
    inv = get_store_info(inv, 'TestDest', mock_settings())
    assert inv.store_number == '0001'
    assert inv.dc_number == '0123'
    assert inv.store_name == 'TestName'