Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects

1606917664 149

Merged Claudio Yosafat requested to merge 1606917664-149 into master
2 files
+ 11
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -254,6 +254,15 @@ class ProfileUpdateTests(APITestCase):
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
self.assertEqual(response.data.get('interests'), 'Machine Learning')
url = '/api/students/' + str(student_id) + "/profile/"
response = self.client.patch(url, {'skills': ''}, format='multipart')
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
self.assertEqual(response.data.get('skills'), '')
url = '/api/students/' + str(student_id) + "/profile/"
response = self.client.patch(url, {'skills': '1231231231'}, format='multipart')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
@requests_mock.Mocker()
def test_student_profile_update_filetype_validation(self, m):
mock_csui_oauth_verify(m)
Loading