Disable eboutic in counter click/main

This commit is contained in:
2024-12-23 01:35:44 +01:00
parent 9c93c004ec
commit 2e5e217842
3 changed files with 19 additions and 1 deletions

View File

@ -70,7 +70,7 @@ class FullClickSetup:
cls.customer_old_can_not_buy = old_subscriber_user.make()
cls.customer_can_not_buy = baker.make(User)
cls.club_counter = baker.make(Counter)
cls.club_counter = baker.make(Counter, type="OFFICE")
baker.make(
Membership,
start_date=now() - timedelta(days=30),
@ -302,6 +302,18 @@ class TestCounterClick(FullClickSetup, TestCase):
def refill_user(self, user: User, amount: Decimal | int):
baker.make(Refilling, amount=amount, customer=user.customer, is_validated=False)
def test_click_eboutic_failure(self):
eboutic = baker.make(Counter, type="EBOUTIC")
self.client.force_login(self.club_admin)
assert (
self.submit_basket(
self.customer,
[BasketItem(self.stamps.id, 5)],
counter=eboutic,
).status_code
== 404
)
def test_click_office_success(self):
self.refill_user(self.customer, 10)
self.client.force_login(self.club_admin)