File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
- from datetime import datetime , timedelta
2
- from http import HTTPStatus
1
+ from datetime import timedelta
2
+
3
3
from django .test import TestCase
4
+ from django .utils import timezone
4
5
5
6
from accounts .models import User
6
7
from jobsapp .forms import CreateJobForm
@@ -13,11 +14,12 @@ def setUp(self) -> None:
13
14
self .valid_job = {
14
15
"title" : "Junior Software Engineer" ,
15
16
"description" : "Looking for Python developer" ,
17
+ "vacancy" : 2 ,
16
18
"salary" : 35000 ,
17
19
"location" : "Dhaka, Bangladesh" ,
18
20
"type" : "1" ,
19
21
"category" : "web-development" ,
20
- "last_date" : datetime .now () + timedelta (days = 30 ),
22
+ "last_date" : timezone .now () + timedelta (days = 30 ),
21
23
"company_name" : "Dev Soft" ,
22
24
"company_description" : "A foreign country" ,
23
25
"website" : "www.devsoft.com" ,
Original file line number Diff line number Diff line change 1
- from datetime import datetime , timedelta
1
+ from datetime import timedelta
2
2
3
3
from django .test import TestCase
4
- from django .utils import translation
4
+ from django .utils import translation , timezone
5
5
6
6
from accounts .models import User
7
7
from jobsapp .models import Applicant , Job
@@ -20,7 +20,7 @@ def setUpTestData(cls) -> None:
20
20
"location" : "Dhaka, Bangladesh" ,
21
21
"type" : "1" ,
22
22
"category" : "web-development" ,
23
- "last_date" : datetime .now () + timedelta (days = 30 ),
23
+ "last_date" : timezone .now () + timedelta (days = 30 ),
24
24
"company_name" : "Dev Soft" ,
25
25
"company_description" : "A foreign country" ,
26
26
"website" : "www.devsoft.com" ,
You can’t perform that action at this time.
0 commit comments