def setUp(self): super(TestConvertingAFulfillmentLineToItemDict, self).setUp() self.line = mwsm.FulfillmentOrderLine(order_item_id='123', quantity=5) self.line.line = Line() self.line.line.product = Product() self.line.line.product.amazon_profile = mwsm.AmazonProfile( sku='MY-SKU')
def test_returns_shipment_status_when_shipped(self): status = 'SHIPPED' line = mwsm.FulfillmentOrderLine() line.shipment = mwsm.FulfillmentShipment(status=status) self.assertEquals(line.status, status)
def test_returns_order_status_when_not_shipped(self): status = mwsm.FulfillmentOrder.SUBMITTED line = mwsm.FulfillmentOrderLine() line.fulfillment_order = mwsm.FulfillmentOrder(status=status) self.assertEquals(line.status, status)