fixed error in test
This commit is contained in:
parent
9e95da5e03
commit
e428602ed5
|
@ -1199,7 +1199,7 @@ class AdminView(APITestCase):
|
|||
self.assertEqual(Internship.objects.get(
|
||||
id=self.internship1.id).offer_accepted, True)
|
||||
self.internship1.refresh_from_db()
|
||||
self.assertEqual(self.internship1.deadline_datetime, timezone.now().replace(
|
||||
self.assertEqual(self.internship1.deadline_datetime, timezone.localtime(timezone.now()).replace(
|
||||
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2))
|
||||
|
||||
def test_updateofferAccepted_withDeadline_internship(self):
|
||||
|
@ -1208,7 +1208,7 @@ class AdminView(APITestCase):
|
|||
"opening_type": "Internship",
|
||||
"opening_id": self.internship3.id,
|
||||
"offer_accepted": "true",
|
||||
"deadline_datetime": (timezone.now().replace(
|
||||
"deadline_datetime": (timezone.localtime(timezone.now()).replace(
|
||||
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S %z')
|
||||
}
|
||||
self.admin.user_type = ["s_admin"]
|
||||
|
@ -1219,7 +1219,7 @@ class AdminView(APITestCase):
|
|||
self.internship3.refresh_from_db()
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(Internship.objects.get(
|
||||
id=self.internship3.id).deadline_datetime, timezone.now().replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1))
|
||||
id=self.internship3.id).deadline_datetime, timezone.localtime(timezone.now()).replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1))
|
||||
self.assertEqual(response.data['message'], 'Offer Accepted Updated')
|
||||
|
||||
def test_updateofferAccepted_wrongOpening_internship(self):
|
||||
|
|
Loading…
Reference in New Issue