I have a view that sets a cookie using a method response.set_cookie. I would like to check if the cookie is set to TestCase.
According to docs , the cookie should be available in the client object, but it client.cookies.itemsreturns an empty list. The cookie is set correctly in the browser.
Any ideas?
EDIT: Adding a Test Case
>>> response = self.client.get(url)
>>> self.client.cookies.items()
[]
The last statement returns an empty list.
source
share