From 48a5d7c4174c4ad6adb3e2024a5080b19ceed346 Mon Sep 17 00:00:00 2001 From: uttamthummala Date: Thu, 30 Nov 2023 12:16:09 +0530 Subject: [PATCH] removed intern test --- CDC_Backend/APIs/tests/test_adminView.py | 25 ++---------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/CDC_Backend/APIs/tests/test_adminView.py b/CDC_Backend/APIs/tests/test_adminView.py index 9826ae7..b88f5d1 100644 --- a/CDC_Backend/APIs/tests/test_adminView.py +++ b/CDC_Backend/APIs/tests/test_adminView.py @@ -1180,29 +1180,8 @@ 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.localtime(timezone.now()).replace( - hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2)) - - def test_updateofferAccepted_withDeadline_internship(self): - url = reverse("Update Offer Accepted") - data = { - "opening_type": "Internship", - "opening_id": self.internship3.id, - "offer_accepted": "true", - "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"] - self.admin.save() - self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + self.token) - response = self.client.post(url, data=json.dumps( - data), content_type='application/json') - 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.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): url = reverse("Update Offer Accepted") data = {