summaryrefslogtreecommitdiff
path: root/django/test
AgeCommit message (Collapse)Author
2015-09-10Refs #20461 -- Fixed parallel test runner on Python 2.7.Collin Anderson
textwrap.indent() is new in Python 3.3.
2015-09-10Avoided running more test processes than necessary.Aymeric Augustin
This reduces the time spent cloning databases. Thanks Tim for the suggestion.
2015-09-09Made it easier to customize the parallel test runner.Aymeric Augustin
Subclass private APIs is marginally better than monkey-patching them, even if it doesn't make a big difference in practice.
2015-09-09Propagated database clone settings to new connections.Aymeric Augustin
2015-09-09Acknoweldeged a limitation of the parallel test runner.Aymeric Augustin
Notably it will fail to report a Model.DoesNotExist exceptions because the class itself isn't pickleable. (Django has specific code to make its instances pickleable.)
2015-09-09Introduced a mixin for serializing tests.Aymeric Augustin
2015-09-09Allowed a port range for the liveserver by default.Aymeric Augustin
This is required for running tests in parallel.
2015-09-09Cloned databases for running tests in parallel.Aymeric Augustin
2015-09-09Implemented a parallel test runner.Aymeric Augustin
2015-09-07Refs #25328 -- Refactored LiveServerTestCase to make it extensible.Jakub Gocławski
2015-09-06Simplified deduplication of test databases.Aymeric Augustin
Use the same code path for: - a database that has the same settings as another database (as defined by test_db_signature) - a database this is defined as a mirror of another database There's no conceptual difference between these two cases. Thanks Shai for the suggestion.
2015-09-06Stopped returning mirrors from setup_databases.Aymeric Augustin
The return value of setup_databases is only used as an argument for teardown_databases which doesn't need mirrors.
2015-09-06Fixed #25357 -- Database deduplication on Oracle.Aymeric Augustin
In order to reuse another database, Django must use set_as_test_mirror.
2015-09-06Split setup_databases.Aymeric Augustin
It contained two sections separated by comments. It makes more sense to put each section in its own function.
2015-09-05Moved an import to the toplevel.Aymeric Augustin
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-08-27Fixed #24590 -- Cached calls to swappable_setting.Markus Holtermann
Moved the lookup in Field.swappable_setting to Apps, and added an lru_cache to cache the results. Refs #24743 Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric Augustin and Tim Graham for the review.
2015-08-24Fixed #23727 -- Inhibited the post_migrate signal when using ↵Tommy Beadle
serialized_rollback. When using a TransactionTestCase with serialized_rollback=True, after creating the database and running its migrations (along with emitting the post_migrate signal), the contents of the database are serialized to _test_serialized_contents. After the first test case, _fixture_teardown() would flush the tables but then the post_migrate signal would be emitted and new rows (with new PKs) would be created in the django_content_type table. Then in any subsequent test cases in a suite, _fixture_setup() attempts to deserialize the content of _test_serialized_contents, but these rows are identical to the rows already in the database except for their PKs. This causes an IntegrityError due to the unique constraint in the django_content_type table. This change made it so that in the above scenario the post_migrate signal is not emitted after flushing the tables, since it will be repopulated during fixture_setup().
2015-08-11Fixed #25163 -- Fixed exception handling in nested test client requests.pscottdevos
2015-08-04Fixed #25191 -- Added string diff to SimpleTestCase.assertXMLEqual() message.Caio Ariede
2015-08-01Fixed #25176 -- Prevented TestCase.setUpTestData() exception from leaking ↵Adam Chainz
transaction.
2015-07-31Fixed #25188 -- Improved message raised by SimpleTestCase.assertRaisesMessage().Tim Graham
Thanks Chris Jerdonek for the suggestion and help with the patch.
2015-07-30Fixed #25190 -- Deprecated callable_obj parameter to assertRaisesMessage().Tim Graham
Thanks Aymeric Augustin for review.
2015-07-01Fixed #20916 -- Added Client.force_login() to bypass authentication.Jon Dufresne
2015-06-27Sorted imports in __init__.py files.Tim Graham
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-06-12Refs #24965 -- Added changes from accidentally reverted file for last commit.Moritz Sichert
2015-06-07Fixed #16860 -- Added password validation to django.contrib.auth.Erik Romijn
2015-06-05Fixed #19542: Made mirroring databases for tests work with OracleShai Berger
No tests are provided because there is no sane way to test database settings within the Django test suite. Thanks Aymeric Augustin for review.
2015-05-25Fixed #24773 -- Added a json() method on test client responses.Andy McKay
2015-05-21Fixed #17085, #24783 -- Refactored template library registration.Preston Timmons
* Converted the ``libraries`` and ``builtins`` globals of ``django.template.base`` into properties of the Engine class. * Added a public API for explicit registration of libraries and builtins.
2015-05-20Fixed #24652 -- Disallowed query execution in SimpleTestCase subclasses.Simon Charette
Thanks to Tim and Anssi for the review.
2015-05-18Added backwards compatibility for assertRaisesMessage callable_obj param.Tim Graham
This was broken in c2bc1cefdcbbf074408f4a4cace88b315cf9d652 (refs #23763).
2015-05-17Fixed #23820 -- Supported per-database time zone.Aymeric Augustin
The primary use case is to interact with a third-party database (not primarily managed by Django) that doesn't support time zones and where datetimes are stored in local time when USE_TZ is True. Configuring a PostgreSQL database with the TIME_ZONE option while USE_TZ is False used to result in silent data corruption. Now this is an error.
2015-05-16Refs #23763 -- Silenced SimpleTestCase.assertRaisesMessage() deprecation ↵Tim Graham
warning on Python 3.5. Deprecation warning was introduced in https://bugs.python.org/issue24134
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-04-24Fixed #24526 -- Combined django.request/security loggers with the root logger.Tim Graham
Thanks Carl Meyer for review.
2015-03-29Fixed #19259 -- Added group by selected primary keys support.Simon Charette
2015-03-18Fixed #23960 -- Removed http.fix_location_headerClaude Paroz
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-03-18Fixed #24476 -- Added context manager/decorator for overriding script prefix.Bas Peschier
Tests were using an undocumented keyword argument for easily overriding script prefix while reversing. This is now changed into a test utility which can be used as decorator or context manager.
2015-02-28Simplified emit_post_migrate from flush commandClaude Paroz
Follow-up of f4f24d30e0.
2015-02-15Deprecated TEMPLATE_DEBUG setting.Aymeric Augustin
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-05Removed old import aliases.Tim Graham
2015-02-05Called parent in SimpleTestCase.setUpClass/tearDownClass.Aymeric Augustin
2015-02-04Fixed #24197 -- Added clearing of staticfiles caches on settings changes ↵mlavin
during tests Cleared caching in staticfiles_storage and get_finder when relevant settings are changed.
2015-02-03Fixed #24168 -- Allowed selecting a template engine in a few APIs.Aymeric Augustin
Specifically in rendering shortcuts, template responses, and class-based views that return template responses. Also added a test for render_to_response(status=...) which was missing from fdbfc980. Thanks Tim and Carl for the review.
2015-01-18Removed test.utils.TestTemplateLoader per deprecation timeline.Tim Graham
2015-01-12Fixed #24118 -- Added --debug-sql option for tests.Marc Tamlyn
Added a --debug-sql option for tests and runtests.py which outputs the SQL logger for failing tests. When combined with --verbosity=2, it also outputs the SQL for passing tests. Thanks to Berker, Tim, Markus, Shai, Josh and Anssi for review and discussion.
2015-01-03Removed extraneous super call in LiveServerTestCaseClaude Paroz
Refs #21281. Thanks Tim Graham and Thomas Chaumeny for investigations.