Suppose I have {{registered}} variable in template. I wrote a piece of test:
def nice_test():
response = self.client.post(reverse('app:register'), {'username': 'dupa'}
and there I want to check value of variable registered in response. How to do it ?
The response from the test client has access to the template context used.
Here is a reference to the official documentation: https://docs.djangoproject.com/en/1.7/topics/testing/tools/#django.test.Response.context