edited PPo test
This commit is contained in:
parent
814ed005f1
commit
a9177417f7
|
@ -179,7 +179,7 @@ class AdminView(APITestCase):
|
||||||
response = self.client.post(url, data=json.dumps(
|
response = self.client.post(url, data=json.dumps(
|
||||||
data), content_type='application/json')
|
data), content_type='application/json')
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
self.assertEqual(response.data['message'], 'PPO Added')
|
self.assertEqual(response.data['message'], 'PPO added')
|
||||||
self.assertEqual(PrePlacementOffer.objects.get(
|
self.assertEqual(PrePlacementOffer.objects.get(
|
||||||
student=self.student1).company, data['company'])
|
student=self.student1).company, data['company'])
|
||||||
self.assertEqual(PrePlacementOffer.objects.get(
|
self.assertEqual(PrePlacementOffer.objects.get(
|
||||||
|
@ -379,7 +379,8 @@ class AdminView(APITestCase):
|
||||||
self.assertEqual(Placement.objects.get(
|
self.assertEqual(Placement.objects.get(
|
||||||
id=self.placement1.id).deadline_datetime, timezone.now().replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2))
|
id=self.placement1.id).deadline_datetime, timezone.now().replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2))
|
||||||
data['opening_id'] = self.placement3.id
|
data['opening_id'] = self.placement3.id
|
||||||
data[DEADLINE_DATETIME]=(timezone.now().replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S %z')
|
data[DEADLINE_DATETIME] = (timezone.now().replace(
|
||||||
|
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S %z')
|
||||||
response = self.client.post(url, data=json.dumps(
|
response = self.client.post(url, data=json.dumps(
|
||||||
data), content_type='application/json')
|
data), content_type='application/json')
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
|
@ -503,7 +504,8 @@ class AdminView(APITestCase):
|
||||||
"opening_id": self.internship1.id,
|
"opening_id": self.internship1.id,
|
||||||
"opening_type": "Placement"
|
"opening_type": "Placement"
|
||||||
}
|
}
|
||||||
self.assertEqual(Student.objects.filter(id=self.student1.id).count(), 1)
|
self.assertEqual(Student.objects.filter(
|
||||||
|
id=self.student1.id).count(), 1)
|
||||||
self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + self.token)
|
self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + self.token)
|
||||||
response = self.client.post(url, data, content_type='application/json')
|
response = self.client.post(url, data, content_type='application/json')
|
||||||
# self.assertEqual(response.status_code, status.HTTP_200_OK)
|
# self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
|
@ -720,7 +722,8 @@ class AdminView(APITestCase):
|
||||||
self.assertEqual(self.internship1.deadline_datetime, timezone.now().replace(
|
self.assertEqual(self.internship1.deadline_datetime, timezone.now().replace(
|
||||||
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2))
|
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=2))
|
||||||
data['opening_id'] = self.internship3.id
|
data['opening_id'] = self.internship3.id
|
||||||
data[DEADLINE_DATETIME] = (timezone.now().replace(hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S %z')
|
data[DEADLINE_DATETIME] = (timezone.now().replace(
|
||||||
|
hour=0, minute=0, second=0, microsecond=0)+timezone.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S %z')
|
||||||
response = self.client.post(url, data=json.dumps(
|
response = self.client.post(url, data=json.dumps(
|
||||||
data), content_type='application/json')
|
data), content_type='application/json')
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
|
|
Loading…
Reference in New Issue