Merge lp://qastaging/~zyga/django-testscenarios/0.6 into lp://qastaging/django-testscenarios

Proposed by Zygmunt Krynicki
Status: Merged
Merged at revision: 23
Proposed branch: lp://qastaging/~zyga/django-testscenarios/0.6
Merge into: lp://qastaging/django-testscenarios
Diff against target: 431 lines (+160/-56)
15 files modified
django_testproject/settings.py (+16/-14)
django_testproject/templates/django_testproject/base.html (+10/-0)
django_testproject/templates/registration/base.html (+4/-0)
django_testproject/templates/registration/logged_out.html (+3/-0)
django_testproject/templates/registration/login.html (+25/-0)
django_testproject/tests.py (+50/-3)
django_testscenarios/__init__.py (+17/-0)
django_testscenarios/models.py (+1/-1)
django_testscenarios/test_project/__init__.py (+1/-1)
django_testscenarios/test_project/manage.py (+2/-2)
django_testscenarios/test_project/settings.py (+2/-6)
django_testscenarios/test_project/tests.py (+6/-2)
django_testscenarios/tests.py (+6/-6)
django_testscenarios/ubertest.py (+5/-6)
setup.py (+12/-15)
To merge this branch: bzr merge lp://qastaging/~zyga/django-testscenarios/0.6
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+61984@code.qastaging.launchpad.net

Description of the change

Fix design issue and release 0.6

The design issue was related to way django-testproject worked. It previously assumed that local test project would always have the name 'test_project'. This turned out to be a bad decision because of the way django double-imports settings with different paths. With simple scenario it could lead to wrong test_project being imported (different one in each python process).

To fix this I had to break backwards compatibility. There are few ways this affects users:

1) Instead of django_testproject.tests.run_tests() you must use django_testproject.tests.run_tests_for() and call it with the name of your settings module ("myapp.test_project.settings"). The old call is retained and works as before but is now deprecated.

2) To make it possible to import django_testscenarios.test_project directly I had to move some code from django_testproject/__init__.py into sub-module. This affects anyone who imported test cases from that package. They are all now in django_testscenarios.ubertest. This breaks compatibility directly.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: