fix: require store for new orders, if so configured

This commit is contained in:
Lance Edgar 2025-02-19 19:18:30 -06:00
parent f3cca2e370
commit 7ea83b2715
2 changed files with 13 additions and 1 deletions

View file

@ -1114,9 +1114,15 @@ class TestNewOrderBatchHandler(DataTestCase):
self.session.add(row)
self.session.flush()
# batch is okay to execute..
reason = handler.why_not_execute(batch)
self.assertIsNone(reason)
# unless we also require store
self.config.setdefault('sideshow.orders.expose_store_id', 'true')
reason = handler.why_not_execute(batch)
self.assertEqual(reason, "Must assign the store")
def test_make_local_customer(self):
model = self.app.model
enum = self.app.enum