add tests

This commit is contained in:
imperosol
2026-09-17 12:51:16 +02:00
parent ee6b4d4b1e
commit 46318be572
2 changed files with 35 additions and 1 deletions
+8 -1
View File
@@ -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(