ansible / eda-server

Event Driven Ansible for AAP
Apache License 2.0
64 stars 41 forks source link

Test quality of life change - show traceback for 500 server errors #881

Closed AlanCoding closed 4 months ago

AlanCoding commented 4 months ago

Please confirm the following

Feature type

Enhancement to Existing Feature

Feature Summary

Make it easier to debug the source of errors when running tests.

Steps to reproduce

Force a python exception to be thrown inside of a request, like when using the user_client fixture or other similar fixtures. Then run it, get the failure, and observe that a 500 server error happened.

Current results

We can observe a 500 response code, but we do not get a traceback.

Sugested feature result

Tests print the traceback.

Additional information

The source of the issue has been identified that the DEBUG setting is True during tests. This is uncommon, and undesirable.

We have been occasionally hacking this by applying @override_settings(DEBUG=True) to individual tests.

It would be better to change this globally, specific to whenever tests are being ran. I struggled to do this, because eda-server seems to be using some extra settings libraries that I don't follow the mechanics of.