feat: add basic "create order" feature, docs, tests
just the package API docs so far, narrative will come later
This commit is contained in:
parent
89265f0240
commit
ef07d30a85
86 changed files with 7749 additions and 35 deletions
0
tests/db/model/batch/__init__.py
Normal file
0
tests/db/model/batch/__init__.py
Normal file
23
tests/db/model/batch/test_neworder.py
Normal file
23
tests/db/model/batch/test_neworder.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
from wuttjamaican.testing import DataTestCase
|
||||
|
||||
from sideshow.db.model.batch import neworder as mod
|
||||
from sideshow.db.model.products import PendingProduct
|
||||
|
||||
|
||||
class TestNewOrderBatchRow(DataTestCase):
|
||||
|
||||
def test_str(self):
|
||||
|
||||
row = mod.NewOrderBatchRow()
|
||||
self.assertEqual(str(row), "")
|
||||
|
||||
row = mod.NewOrderBatchRow(product_description="Vinegar")
|
||||
self.assertEqual(str(row), "Vinegar")
|
||||
|
||||
product = PendingProduct(brand_name="Bragg",
|
||||
description="Vinegar",
|
||||
size="32oz")
|
||||
row = mod.NewOrderBatchRow(pending_product=product)
|
||||
self.assertEqual(str(row), "Bragg Vinegar 32oz")
|
Loading…
Add table
Add a link
Reference in a new issue