Fakultas Ilmu Komputer UI

Commit 21200d81 authored by Muhammad Fauzan Fikri's avatar Muhammad Fauzan Fikri
Browse files

buat test untuk mengecek bahwa nilai tidak valid

parent be764d62
Pipeline #26538 failed with stages
in 4 minutes and 56 seconds
......@@ -399,6 +399,10 @@ class ProfileUpdateTests(APITestCase):
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
self.assertEqual(response.data.get('student_toefl'), 500)
url = '/api/students/' + str(student_id) + "/profile/"
response = self.client.patch(url, {'student_toefl': 'this is not valid input'}, format='multipart')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
url = '/api/students/' + str(student_id) + '/profile/'
response = self.client.patch(url, {'volunteer': 'Ketua BEM UI - 2020'}, format='multipart')
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment