feat: add basic support for local customer, product lookups
also convert pending to local (where relevant) when executing batch
This commit is contained in:
parent
ebd22fe6ee
commit
a4ad23c7fa
23 changed files with 3205 additions and 796 deletions
|
@ -19,6 +19,19 @@ class TestOrder(DataTestCase):
|
|||
|
||||
class TestOrderItem(DataTestCase):
|
||||
|
||||
def test_full_description(self):
|
||||
|
||||
item = mod.OrderItem()
|
||||
self.assertEqual(item.full_description, "")
|
||||
|
||||
item = mod.OrderItem(product_description="Vinegar")
|
||||
self.assertEqual(item.full_description, "Vinegar")
|
||||
|
||||
item = mod.OrderItem(product_brand='Bragg',
|
||||
product_description='Vinegar',
|
||||
product_size='32oz')
|
||||
self.assertEqual(item.full_description, "Bragg Vinegar 32oz")
|
||||
|
||||
def test_str(self):
|
||||
|
||||
item = mod.OrderItem()
|
||||
|
@ -27,8 +40,7 @@ class TestOrderItem(DataTestCase):
|
|||
item = mod.OrderItem(product_description="Vinegar")
|
||||
self.assertEqual(str(item), "Vinegar")
|
||||
|
||||
product = PendingProduct(brand_name="Bragg",
|
||||
description="Vinegar",
|
||||
size="32oz")
|
||||
item = mod.OrderItem(pending_product=product)
|
||||
item = mod.OrderItem(product_brand='Bragg',
|
||||
product_description='Vinegar',
|
||||
product_size='32oz')
|
||||
self.assertEqual(str(item), "Bragg Vinegar 32oz")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue