Merge branch 'Internship-Update' of https://github.com/uttamthummala/cdc-placement-website-backend into pr/uttamthummala/178
This commit is contained in:
commit
497b7f0a3c
|
@ -14,9 +14,7 @@ class AdminView(APITestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.client = APIClient()
|
self.client = APIClient()
|
||||||
self.admin = User.objects.create(email=str(os.environ.get(
|
self.admin = User.objects.create(email=str(os.environ.get(
|
||||||
"email_id")), id=generateRandomString(), user_type=[ADMIN])
|
"EMAIL")), id=generateRandomString(), user_type=[ADMIN])
|
||||||
self.s_admin = User.objects.create(email=str(os.environ.get(
|
|
||||||
"s_email")), id=generateRandomString(), user_type=["s_admin"])
|
|
||||||
self.user1 = User.objects.create(
|
self.user1 = User.objects.create(
|
||||||
email="200010032@iitdh.ac.in", id="200010032", user_type=[STUDENT])
|
email="200010032@iitdh.ac.in", id="200010032", user_type=[STUDENT])
|
||||||
self.user2 = User.objects.create(
|
self.user2 = User.objects.create(
|
||||||
|
@ -79,7 +77,7 @@ class AdminView(APITestCase):
|
||||||
id=generateRandomString(), student=self.student3, internship=self.internship2, resume="8BSLybntULgrPPm_beehyv.pdf")
|
id=generateRandomString(), student=self.student3, internship=self.internship2, resume="8BSLybntULgrPPm_beehyv.pdf")
|
||||||
|
|
||||||
response = self.client.post(reverse('Refresh Token'), {
|
response = self.client.post(reverse('Refresh Token'), {
|
||||||
'refresh_token': os.environ.get("refresh_token")}, format='json')
|
'refresh_token': os.environ.get("REFRESH_TOKEN")}, format='json')
|
||||||
|
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,13 @@ class StudentViewsTestCase(APITestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.client = APIClient()
|
self.client = APIClient()
|
||||||
self.user = User.objects.create(
|
self.user = User.objects.create(
|
||||||
email=str(os.environ.get("email_id")),
|
email=str(os.environ.get("EMAIL")),
|
||||||
id=str(os.environ.get("roll_no")),
|
id=str(os.environ.get("ROLL_NO")),
|
||||||
user_type=[STUDENT])
|
user_type=[STUDENT])
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.user.email, User.objects.get(id=self.user.id).email)
|
self.user.email, User.objects.get(id=self.user.id).email)
|
||||||
self.student = Student.objects.create(
|
self.student = Student.objects.create(
|
||||||
name="Test Student", id=self.user.id, resumes=["8BSLybntULgrPPm_beehyv.pdf"], roll_no=str(os.environ.get("roll_no")), branch="CSE", batch="2020", phone_number=1234567890, changed_by=self.user, can_apply=True,
|
name="Test Student", id=self.user.id, resumes=["8BSLybntULgrPPm_beehyv.pdf"], roll_no=str(os.environ.get("ROLL_NO")), branch="CSE", batch="2020", phone_number=1234567890, changed_by=self.user, can_apply=True,
|
||||||
can_apply_internship=True, degree="bTech", cpi=7.95,
|
can_apply_internship=True, degree="bTech", cpi=7.95,
|
||||||
)
|
)
|
||||||
self.assertEqual(self.student.name,
|
self.assertEqual(self.student.name,
|
||||||
|
@ -61,7 +61,7 @@ class StudentViewsTestCase(APITestCase):
|
||||||
|
|
||||||
# get token from google OAuth API
|
# get token from google OAuth API
|
||||||
response = self.client.post(reverse('Refresh Token'), {
|
response = self.client.post(reverse('Refresh Token'), {
|
||||||
'refresh_token': os.environ.get("refresh_token")}, format='json')
|
'refresh_token': os.environ.get("REFRESH_TOKEN")}, format='json')
|
||||||
self.student_token = response.data['id_token']
|
self.student_token = response.data['id_token']
|
||||||
|
|
||||||
def test_student_accept_offer_internship(self):
|
def test_student_accept_offer_internship(self):
|
||||||
|
|
Loading…
Reference in New Issue