mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-18 02:04:20 +00:00
add tests
This commit is contained in:
@@ -108,6 +108,13 @@ class TestFullClickBase(TestCase):
|
||||
|
||||
|
||||
class TestRefilling(TestFullClickBase):
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
super().setUpTestData()
|
||||
cls.board_admin.user_permissions.add(
|
||||
Permission.objects.get(codename="add_refilling")
|
||||
)
|
||||
|
||||
def login_in_bar(self, barmen: User | None = None):
|
||||
used_barman = barmen if barmen is not None else self.board_admin
|
||||
self.client.post(
|
||||
@@ -147,7 +154,7 @@ class TestRefilling(TestFullClickBase):
|
||||
assert self.updated_amount(self.customer) == 0
|
||||
|
||||
def test_refilling_no_refer_fail(self):
|
||||
"""Check that the refill fails is the HTTP_REFERER header is missing"""
|
||||
"""Check that the refill fails if the HTTP_REFERER header is missing"""
|
||||
|
||||
def refill():
|
||||
return self.client.post(
|
||||
|
||||
Reference in New Issue
Block a user