-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.py
More file actions
22 lines (18 loc) · 820 Bytes
/
base.py
File metadata and controls
22 lines (18 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import django.urls
import rest_framework.test
import rest_framework_simplejwt.token_blacklist.models as tb_models
import user.models
class BaseUserAuthTestCase(rest_framework.test.APITestCase):
@classmethod
def setUpTestData(cls):
super().setUpTestData()
cls.client = rest_framework.test.APIClient()
cls.protected_url = django.urls.reverse('api-core:protected')
cls.refresh_url = django.urls.reverse('api-user:user-token-refresh')
cls.signup_url = django.urls.reverse('api-user:sign-up')
cls.signin_url = django.urls.reverse('api-user:sign-in')
def tearDown(self):
user.models.User.objects.all().delete()
tb_models.BlacklistedToken.objects.all().delete()
tb_models.OutstandingToken.objects.all().delete()
super().tearDown()