django-test-utils icon indicating copy to clipboard operation
django-test-utils copied to clipboard

Work on Django 1.4 support branch

Open bmihelac opened this issue 12 years ago • 4 comments

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 contextassigned.

Any help will be appreciated.

bmihelac avatar May 18 '12 20:05 bmihelac

I found that this is related to django test client behavior. I filled a ticket on django issue tracker.

bmihelac avatar May 20 '12 16:05 bmihelac

Awesome work. Feel free to send a pull request to this repo and I'll gladly merge it in.

Cheers, Eric

ericholscher avatar May 24 '12 16:05 ericholscher

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

bmihelac avatar May 25 '12 05:05 bmihelac

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

bmihelac avatar Aug 14 '13 17:08 bmihelac