Lifespark-Technologies / Infomed

Web portal that enables communication between hospitals and health authorities
MIT License
1 stars 1 forks source link

AppointmentSlot test cases failing #84

Open kaashmonee opened 4 years ago

kaashmonee commented 4 years ago

The test cases associated with the AppointmentSlot changes merged in #79 fail. I'm entirely sure why these fail now since they passed when merging #79. @bl-nero any thoughts on this?

This is the console log:

System check identified 1 issue (0 silenced).
EF....
======================================================================
ERROR: test_creates_and_retrieves_slots (hospitals.tests.AppointmentSlotTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kaashmonee/Documents/Infomed/hospitals/tests.py", line 73, in test_creates_and_retrieves_slots
    response_without_ids = [strip_id(slot) for slot in response.json()]
  File "/home/kaashmonee/infomed/lib/python3.8/site-packages/django/test/client.py", line 649, in _parse_json
    raise ValueError(
ValueError: Content-Type header is "text/html; charset=utf-8", not "application/json"

======================================================================
FAIL: test_removes_slots (hospitals.tests.AppointmentSlotTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kaashmonee/Documents/Infomed/hospitals/tests.py", line 107, in test_removes_slots
    self.assertEqual(response.status_code, 204)
AssertionError: 200 != 204

----------------------------------------------------------------------
Ran 6 tests in 0.083s

FAILED (failures=1, errors=1)
Destroying test database for alias 'default'...

Thanks.