mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Disable eboutic in counter click/main
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user