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
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue