-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.py
More file actions
26 lines (23 loc) · 919 Bytes
/
base.py
File metadata and controls
26 lines (23 loc) · 919 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
import business.models
import django.urls
import rest_framework
import rest_framework.status
import rest_framework.test
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.signup_url = django.urls.reverse('api-business:company-sign-up')
cls.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()