fix: format all code with black
and from now on should not deviate from that...
This commit is contained in:
parent
925235f0d3
commit
2107e9ee1d
47 changed files with 5729 additions and 3977 deletions
|
@ -16,8 +16,6 @@ class TestNewOrderBatchRow(DataTestCase):
|
|||
row = mod.NewOrderBatchRow(product_description="Vinegar")
|
||||
self.assertEqual(str(row), "Vinegar")
|
||||
|
||||
product = PendingProduct(brand_name="Bragg",
|
||||
description="Vinegar",
|
||||
size="32oz")
|
||||
product = PendingProduct(brand_name="Bragg", description="Vinegar", size="32oz")
|
||||
row = mod.NewOrderBatchRow(pending_product=product)
|
||||
self.assertEqual(str(row), "Bragg Vinegar 32oz")
|
||||
|
|
|
@ -21,7 +21,7 @@ class TestOrderItem(DataTestCase):
|
|||
|
||||
def make_config(self, **kw):
|
||||
config = super().make_config(**kw)
|
||||
config.setdefault('wutta.enum_spec', 'sideshow.enum')
|
||||
config.setdefault("wutta.enum_spec", "sideshow.enum")
|
||||
return config
|
||||
|
||||
def test_full_description(self):
|
||||
|
@ -32,9 +32,9 @@ class TestOrderItem(DataTestCase):
|
|||
item = mod.OrderItem(product_description="Vinegar")
|
||||
self.assertEqual(item.full_description, "Vinegar")
|
||||
|
||||
item = mod.OrderItem(product_brand='Bragg',
|
||||
product_description='Vinegar',
|
||||
product_size='32oz')
|
||||
item = mod.OrderItem(
|
||||
product_brand="Bragg", product_description="Vinegar", product_size="32oz"
|
||||
)
|
||||
self.assertEqual(item.full_description, "Bragg Vinegar 32oz")
|
||||
|
||||
def test_str(self):
|
||||
|
@ -45,15 +45,15 @@ class TestOrderItem(DataTestCase):
|
|||
item = mod.OrderItem(product_description="Vinegar")
|
||||
self.assertEqual(str(item), "Vinegar")
|
||||
|
||||
item = mod.OrderItem(product_brand='Bragg',
|
||||
product_description='Vinegar',
|
||||
product_size='32oz')
|
||||
item = mod.OrderItem(
|
||||
product_brand="Bragg", product_description="Vinegar", product_size="32oz"
|
||||
)
|
||||
self.assertEqual(str(item), "Bragg Vinegar 32oz")
|
||||
|
||||
def test_add_event(self):
|
||||
model = self.app.model
|
||||
enum = self.app.enum
|
||||
user = model.User(username='barney')
|
||||
user = model.User(username="barney")
|
||||
item = mod.OrderItem()
|
||||
self.assertEqual(item.events, [])
|
||||
item.add_event(enum.ORDER_ITEM_EVENT_INITIATED, user)
|
||||
|
|
|
@ -20,9 +20,9 @@ class TestPendingProduct(DataTestCase):
|
|||
product = mod.PendingProduct(size="32oz")
|
||||
self.assertEqual(str(product), "32oz")
|
||||
|
||||
product = mod.PendingProduct(brand_name="Bragg",
|
||||
description="Vinegar",
|
||||
size="32oz")
|
||||
product = mod.PendingProduct(
|
||||
brand_name="Bragg", description="Vinegar", size="32oz"
|
||||
)
|
||||
self.assertEqual(str(product), "Bragg Vinegar 32oz")
|
||||
|
||||
def test_full_description(self):
|
||||
|
@ -38,7 +38,7 @@ class TestPendingProduct(DataTestCase):
|
|||
product = mod.PendingProduct(size="32oz")
|
||||
self.assertEqual(product.full_description, "32oz")
|
||||
|
||||
product = mod.PendingProduct(brand_name="Bragg",
|
||||
description="Vinegar",
|
||||
size="32oz")
|
||||
product = mod.PendingProduct(
|
||||
brand_name="Bragg", description="Vinegar", size="32oz"
|
||||
)
|
||||
self.assertEqual(product.full_description, "Bragg Vinegar 32oz")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue