[Fixed]-DRF + CoreAPIClient + psycopg2 throws exception, Interface error: connection already closed


I would suggest using rest_framework.test.APITransactionTestCase instead of rest_framework.test.APITestCase


This seems to be a code issue, are you using django-cors-headers and new open-api based solution? core API is kind of deprecated now.

The 500 Internal Server Error is a "server-side" error, meaning the problem is not with your PC or Internet connection but instead is a problem with the web site’s server. … So definitely the problem is in servers you were using.


Leave a comment