-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.py
More file actions
30 lines (26 loc) · 953 Bytes
/
base.py
File metadata and controls
30 lines (26 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import django.urls
import rest_framework
import rest_framework.test
import business.models
class BaseBusinessAuthTestCase(rest_framework.test.APITestCase):
@classmethod
def setUpTestData(cls):
super().setUpTestData()
cls.client = rest_framework.test.APIClient()
cls.company_refresh_url = django.urls.reverse(
'api-business:company-token-refresh',
)
cls.protected_url = django.urls.reverse('api-core:protected')
cls.company_signup_url = django.urls.reverse(
'api-business:company-sign-up',
)
cls.company_signin_url = django.urls.reverse(
'api-business:company-sign-in',
)
cls.valid_data = {
'name': 'Digital Marketing Solutions Inc.',
'email': 'testcompany@example.com',
'password': 'SecurePass123!',
}
def tearDown(self):
business.models.Company.objects.all().delete()