Commit graph

168 commits

Author SHA1 Message Date
Ole Laursen 7aa3737c3b Reenable RemoteUserMiddleware, it turns out the Secretariat tests are
using REMOTE_USER to auth instead of logging in - instead include a
little middleware class that adds the REMOTE_USER header during
testing.

Also fix problem with the empty test_label hack not working with
double-dotted Secretariat apps.
 - Legacy-Id: 6935
2013-12-16 12:59:27 +00:00
Ole Laursen b4706af925 Fix problem with tests and RemoteUserMiddleware - it interferes with
the tests, also fix bug in previous test runner refactor
 - Legacy-Id: 6914
2013-12-13 15:37:04 +00:00
Ole Laursen dec6862787 Make GLOBAL_TEST_FIXTURES support Python functions as fixtures
- Legacy-Id: 6906
2013-12-13 13:13:03 +00:00
Ole Laursen c470e57dae Port test runner to new Django interface
- Legacy-Id: 6903
2013-12-13 11:22:40 +00:00
Ole Laursen 3053bef4cc Resurrect URL coverage making it work with all tests, and move it to the test runner together with the template coverage report
- Legacy-Id: 6844
2013-12-07 19:31:32 +00:00
Henrik Levkowetz d8e3e32ee7 Set TEMPLATE_STRING_TO_INVALID to '' during testing.
- Legacy-Id: 6493
2013-10-27 10:02:21 +00:00
Henrik Levkowetz a07f47a4a0 Added a new TestCase class, subclassing django.test.TestCase, in order to
be able to add fixtures once and for all for all tests, instead of loading
them again and again for each test, if running on a database that supports
transaction rollbacks.  In this case, fixtures specified in the perma_fixtures
class attribute will be loaded permanently, and not re-loaded.  Fixtures
specifice as before, in a fixtures class attribute, will be treated as
before.

The downside of this is that as fixtures are loaded and not unloaded, they
can conflict with each other.  The requirements on consistency becomes much
greater.  The effect of this has been to require quite a bit of changes to
the simplified creations of various objects in make_test_data() in cases
where identically named objects occur in fixtures.  Where completely
fictitious objects are created, no conflicts appear.

Also re-wrote parts of test_runner.py to permit global fixtures, loaded
before any tests are run and shared by all.
 - Legacy-Id: 6318
2013-09-30 20:22:24 +00:00
Henrik Levkowetz 6baea429aa Merged in the nomcom app from ejimenez@yaco.es and esanchez@yaco.es, and accompanying dbtemplate app and the (standard) docutils module. Added some tweaks to get all tests to pass and migrations to run.
- Legacy-Id: 5948
2013-08-06 10:09:29 +00:00
Henrik Levkowetz 3105101cc5 Changed test running and test data generation to work with database rollback
(for instance with InnoDB).

Added settings.DATABASE_TEST_OPTIONS which can be used to force for instance
InnoDB use during testing.

Using this has the potential of reducing the time it takes to run the test
suite substantially; a few test runs indicate a reduction in test run time by
50% on a run-of-the-mill linux server.
 - Legacy-Id: 5823
2013-07-15 07:21:34 +00:00
Henrik Levkowetz 9d9e2851e0 Test the argument list, not the tuple of argument tuple.
- Legacy-Id: 5134
2012-12-16 18:30:25 +00:00
Henrik Levkowetz 97a7ab30db Added simple logging of test runs, to make it easier to be sure that tests has been run successfully on the latest code.
- Legacy-Id: 5131
2012-12-15 22:47:11 +00:00
Henrik Levkowetz d0214d3b25 Merged [4806] from rjsparks@nostrum.com:
Better handling for BoFs, particularly those that won't create WGs
 - Legacy-Id: 4939
2012-10-21 14:40:02 +00:00
Henrik Levkowetz 1bc2f7daa2 Tweak test setup message for site_id change.
- Legacy-Id: 4567
2012-07-03 13:42:36 +00:00
Henrik Levkowetz 350914da15 Minor cleanup of test_runner.py. Added guards against settings which can make tests inexplicably fail. Updated check to avoid running tests on production server.
- Legacy-Id: 4564
2012-07-03 11:31:11 +00:00
Ole Laursen 9ae5f6a456 Make test runner multi-DB-aware
- Legacy-Id: 3786
2011-12-23 13:15:27 +00:00
Ole Laursen ce74be89ef Use the test mode in the mail code when running automated tests instead of
reinventing the wheel in test_runner
 - Legacy-Id: 3620
2011-11-15 11:24:33 +00:00
Ole Laursen f7eefe8ee2 Finally get the mail system during automated test to send the real
message (i.e. pretend to do) instead of sending a copy, should make it
a bit easier to write tests
 - Legacy-Id: 3595
2011-11-08 11:48:57 +00:00
Henrik Levkowetz 266b7820d0 Merged from log:branch/2.00@2363: Current release branch head to trunk.
- Legacy-Id: 2365
2010-07-21 12:48:05 +00:00