[api] Django Restframework update to 3.3.x will affect tests
A heads-up with django restframework 3.3.x: apparently they changed something internally, so that some of the POST requests we're issuing will not any longer return a 400, but a 415 (Unsupported Media Type) error.
Here is a list of affected tests:
======================================================================
FAIL: test_bad_request_for_post_method_without_needed_data (beat.web.algorithms.tests.tests_api.AlgorithmCreation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/test/beat.web/beat/web/algorithms/tests/tests_api.py", line 410, in test_bad_request_for_post_method_without_needed_data
self.checkResponse(response, 400)
File "/home/user/test/beat.web/beat/web/common/testutils.py", line 66, in checkResponse
self.assertEqual(response.status_code, status_code)
AssertionError: 415 != 400
======================================================================
FAIL: test_bad_request_for_post_method_without_needed_data (beat.web.algorithms.tests.tests_api.AlgorithmsNameCheck)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/test/beat.web/beat/web/algorithms/tests/tests_api.py", line 284, in test_bad_request_for_post_method_without_needed_data
self.checkResponse(response, 400)
File "/home/user/test/beat.web/beat/web/common/testutils.py", line 66, in checkResponse
self.assertEqual(response.status_code, status_code)
AssertionError: 415 != 400
======================================================================
FAIL: test_bad_request_for_post_method_without_needed_data (beat.web.dataformats.tests.tests_api.DataFormatCreation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/test/beat.web/beat/web/dataformats/tests/tests_api.py", line 279, in test_bad_request_for_post_method_without_needed_data
self.checkResponse(response, 400)
File "/home/user/test/beat.web/beat/web/common/testutils.py", line 66, in checkResponse
self.assertEqual(response.status_code, status_code)
AssertionError: 415 != 400
======================================================================
FAIL: test_bad_request_for_post_method_without_needed_data (beat.web.dataformats.tests.tests_api.DataFormatsNameCheck)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/test/beat.web/beat/web/dataformats/tests/tests_api.py", line 178, in test_bad_request_for_post_method_without_needed_data
self.checkResponse(response, 400)
File "/home/user/test/beat.web/beat/web/common/testutils.py", line 66, in checkResponse
self.assertEqual(response.status_code, status_code)
AssertionError: 415 != 400
======================================================================
FAIL: test_bad_request_for_post_method_without_needed_data (beat.web.libraries.tests.tests_api.LibrariesNameCheck)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/test/beat.web/beat/web/libraries/tests/tests_api.py", line 253, in test_bad_request_for_post_method_without_needed_data
self.checkResponse(response, 400)
File "/home/user/test/beat.web/beat/web/common/testutils.py", line 66, in checkResponse
self.assertEqual(response.status_code, status_code)
AssertionError: 415 != 400
======================================================================
FAIL: test_bad_request_for_post_method_without_needed_data (beat.web.libraries.tests.tests_api.LibraryCreation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/test/beat.web/beat/web/libraries/tests/tests_api.py", line 378, in test_bad_request_for_post_method_without_needed_data
self.checkResponse(response, 400)
File "/home/user/test/beat.web/beat/web/common/testutils.py", line 66, in checkResponse
self.assertEqual(response.status_code, status_code)
AssertionError: 415 != 400
======================================================================
FAIL: test_bad_request_for_post_method_without_needed_data (beat.web.toolchains.tests.ToolchainCreation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/test/beat.web/beat/web/toolchains/tests.py", line 807, in test_bad_request_for_post_method_without_needed_data
self.checkResponse(response, 400)
File "/home/user/test/beat.web/beat/web/common/testutils.py", line 66, in checkResponse
self.assertEqual(response.status_code, status_code)
AssertionError: 415 != 400
----------------------------------------------------------------------
Ran 818 tests in 234.487s
FAILED (failures=7)