I have two Django projects (project A and project B) that use the same codebase and have separate settings files (we use the contrib.sites framework). The projects also use the same database.
Project A depends on project B: If a user wants to login from Project A, he will be redirected to a project B view (to perform some actions) and then return back to project A. Everything works fine but problems arise when it comes to testing.
We have a test suit that includes some Selenium tests among other things. To test the login view for project A, both project A and B must be live at the time the selenium test runs. Normally one would do
python manage_b.py runserver 8003
and then
python manage_a.py test
But the two projects should use the same database and project A's testing database is created at run-time.
How can I solve this problem? Is there any way for the test runner to also deploy project B?
At the time we use the standard Django test runner, but making a switch (e.g. to nose or whatever you suggest) would not be a problem.