From 729d3ef59a2e1871f7a96050babc03370c3596ca Mon Sep 17 00:00:00 2001 From: uttamthummala Date: Thu, 19 Oct 2023 03:03:18 +0530 Subject: [PATCH] changed env variables names --- CDC_Backend/APIs/tests/test_adminView.py | 6 ++---- CDC_Backend/APIs/tests/test_studentView.py | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/CDC_Backend/APIs/tests/test_adminView.py b/CDC_Backend/APIs/tests/test_adminView.py index 488f441..cabc1bc 100644 --- a/CDC_Backend/APIs/tests/test_adminView.py +++ b/CDC_Backend/APIs/tests/test_adminView.py @@ -14,9 +14,7 @@ class AdminView(APITestCase): def setUp(self): self.client = APIClient() self.admin = User.objects.create(email=str(os.environ.get( - "email_id")), id=generateRandomString(), user_type=[ADMIN]) - self.s_admin = User.objects.create(email=str(os.environ.get( - "s_email")), id=generateRandomString(), user_type=["s_admin"]) + "EMAIL")), id=generateRandomString(), user_type=[ADMIN]) self.user1 = User.objects.create( email="200010032@iitdh.ac.in", id="200010032", user_type=[STUDENT]) self.user2 = User.objects.create( @@ -79,7 +77,7 @@ class AdminView(APITestCase): id=generateRandomString(), student=self.student3, internship=self.internship2, resume="8BSLybntULgrPPm_beehyv.pdf") 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) diff --git a/CDC_Backend/APIs/tests/test_studentView.py b/CDC_Backend/APIs/tests/test_studentView.py index 3674f7c..7ef1cd0 100644 --- a/CDC_Backend/APIs/tests/test_studentView.py +++ b/CDC_Backend/APIs/tests/test_studentView.py @@ -15,13 +15,13 @@ class StudentViewsTestCase(APITestCase): def setUp(self): self.client = APIClient() self.user = User.objects.create( - email=str(os.environ.get("email_id")), - id=str(os.environ.get("roll_no")), + email=str(os.environ.get("EMAIL")), + id=str(os.environ.get("ROLL_NO")), user_type=[STUDENT]) self.assertEqual( self.user.email, User.objects.get(id=self.user.id).email) 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, ) self.assertEqual(self.student.name, @@ -61,7 +61,7 @@ class StudentViewsTestCase(APITestCase): # get token from google OAuth API 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'] def test_student_accept_offer_internship(self):