File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11from django .contrib .auth .models import User
22from rest_framework import status
33from rest_framework .test import APITestCase
4+ from . import const
45
5- from .models import Cfp , TALK
6+ from .models import Cfp
67
78CFP_URL = '/api/cfp/'
89
@@ -18,7 +19,7 @@ def setUp(self):
1819 title = 'Test' ,
1920 duration = '30min' ,
2021 description = 'Test' ,
21- type = TALK
22+ type = const . TALK
2223 )
2324
2425 # Create user
@@ -39,7 +40,7 @@ def test_create_returns_error_for_unauthenticated_user(self):
3940 'title' : 'Test1' ,
4041 'duration' : 'Test1' ,
4142 'description' : 'Test' ,
42- 'type' : TALK ,
43+ 'type' : const . TALK ,
4344 })
4445 self .assertEqual (status .HTTP_403_FORBIDDEN , result .status_code , 'Status code should be 403 for list.' )
4546
@@ -78,7 +79,7 @@ def test_create_returns_success_for_authenticated_user(self):
7879 'title' : 'Test1' ,
7980 'duration' : 'Test1' ,
8081 'description' : 'Test' ,
81- 'type' : TALK ,
82+ 'type' : const . TALK ,
8283 })
8384 self .assertEqual (status .HTTP_201_CREATED , result .status_code , 'Status code should be 201 for create.' )
8485
You can’t perform that action at this time.
0 commit comments