Closed gfronza closed 11 years ago
Could you create sample project where bug is reproduced?
Thanks for the reply! I've created the project https://github.com/gfronza/django-jenkins-test-client-issue reproducing the issue.
When I was coding this sample I realized that what was breaking was the option 'django_jenkins.tasks.dir_tests'. In my original project, I have both test suits and test cases. If I enable the option dir_tests, tests from test suits are running twice. And apparently, this behavior is causing the resp.context to be None (but I have no idea why).
For now, I've eliminated all test cases from apps sub directories, so there's no need to use dir_tests.
Thanks!
client = Client() resp = client.get('%s?q=test1' % reverse('search')) page = resp.context['page']
When I run the test code (within a TestCase) above with ./manage.py jenkins the resp.context is always None. However, if I run the exact same test with ./manage.py test app_name the context is ok.