django-test-utils
django-test-utils copied to clipboard
Work on Django 1.4 support branch
Hi all,
I am trying to make django-test-utils works nicely with django 1.4. My work is available here:
https://github.com/bmihelac/django-test-utils/tree/django-1.4
Currently there is one test failing. I cannot find and now I am out of ideas, why context is not assigned to response in TestMakerMiddleware (https://github.com/bmihelac/django-test-utils/blob/django-1.4/test_utils/testmaker/middleware/testmaker.py#L68).
If I duplicate same line:
response = c.get(request.path, getdict)
second response will have context
assigned.
Any help will be appreciated.
I found that this is related to django test client behavior. I filled a ticket on django issue tracker.
Awesome work. Feel free to send a pull request to this repo and I'll gladly merge it in.
Cheers, Eric
Great news - I would wait a little more time with pull request, to see if related django issue and patch get accepted. When that happen, I plan to just skip failing test for django version smaller then django 1.5 or 1.4.1.
Then I'll make pull request.
cheers, Bojan
Little update on this - Django issue that prevented all tests to pass has been finally fixed in this commit:
https://github.com/django/django/commit/0cac4fbf699bb6a3de5f4a48c6e047a4dc6c2df7