diff options
author | 2021-08-31 19:21:36 +0200 | |
---|---|---|
committer | 2021-11-26 21:14:16 +0100 | |
commit | f34a52016bd5a7d50c1146d6fbd213ce889f58c7 (patch) | |
tree | 358f03d4735a91391272070c9eb27c60318be70c /pydis_site/apps/api/tests | |
parent | Patch roles test to use fresh instance from the DB (diff) |
Patch signals to use post_delete, instead of pre_delete
From now on the signal will only get executed after the Role has been deleted
The commit also introduces minor changes in the tests of roles
Diffstat (limited to 'pydis_site/apps/api/tests')
-rw-r--r-- | pydis_site/apps/api/tests/test_roles.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pydis_site/apps/api/tests/test_roles.py b/pydis_site/apps/api/tests/test_roles.py index 88c0256b..73c80c77 100644 --- a/pydis_site/apps/api/tests/test_roles.py +++ b/pydis_site/apps/api/tests/test_roles.py @@ -4,7 +4,6 @@ from .base import AuthenticatedAPITestCase from ..models import Role, User - class CreationTests(AuthenticatedAPITestCase): @classmethod def setUpTestData(cls): @@ -96,11 +95,11 @@ class CreationTests(AuthenticatedAPITestCase): url = reverse('api:bot:role-list') response = self.client.get(url) - self.assertContains(response, text="id", count=4, status_code=200) + self.assertContains(response, text="id", count=5, status_code=200) roles = response.json() self.assertIsInstance(roles, list) - self.assertEqual(len(roles), 4) + self.assertEqual(len(roles), 5) for role in roles: self._validate_roledict(role) |