removed intern test
This commit is contained in:
parent
595461f33b
commit
48a5d7c417
|
@ -1180,28 +1180,7 @@ class AdminView(APITestCase):
|
||||||
self.assertEqual(Internship.objects.get(
|
self.assertEqual(Internship.objects.get(
|
||||||
id=self.internship1.id).offer_accepted, True)
|
id=self.internship1.id).offer_accepted, True)
|
||||||
self.internship1.refresh_from_db()
|
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):
|
def test_updateofferAccepted_wrongOpening_internship(self):
|
||||||
url = reverse("Update Offer Accepted")
|
url = reverse("Update Offer Accepted")
|
||||||
|
|
Loading…
Reference in New Issue