summaryrefslogtreecommitdiff
path: root/django/test
AgeCommit message (Collapse)Author
2012-09-18Fixed #18980 -- Fixed assertContains regression when passed an objectJeremy Dunck
2012-09-15Fixed #17948 -- Isolated auth tests from custom template loadersClaude Paroz
Thanks andrey@kostenko.name for the report.
2012-09-07[py3k] Silence many warnings while running the tests.Alex Gaynor
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-21Fixed #18196 -- Improved loaddata error messages.Claude Paroz
2012-08-16Fixed Python version check in testcases.pyClaude Paroz
2012-08-16[py3] Avoided relying on 2.x-only internalsAymeric Augustin
in LiveServerTestCase.
2012-08-15Allow tests using a LiveServer to get closer to working.Alex Gaynor
2012-08-14[py3] Favoured unicode strings in assert(Not)ContainsClaude Paroz
In Python 3, HTMLParser does not support bytestrings.
2012-08-13[py3] Fixed content encoding in test clientClaude Paroz
Thanks Andrews Medina for the initial patch.
2012-08-12[py3] Refactored __unicode__ to __str__.Aymeric Augustin
* Renamed the __unicode__ methods * Applied the python_2_unicode_compatible decorator * Removed the StrAndUnicode mix-in that is superseded by python_2_unicode_compatible * Kept the __unicode__ methods in classes that specifically test it under Python 2
2012-08-11[py3] Fixed reraising of exceptionsClaude Paroz
reraise with second argument to None is not supported.
2012-08-11[py3] Fixed str_prefix test utilityClaude Paroz
2012-08-08[py3] Made Element instances hashableClaude Paroz
2012-08-08Fix TestCase.assertQuerysetEqual on python 3, this is needed for a large ↵Alex Gaynor
number of tests
2012-08-07[py3] Ported django.test.doctest.Aymeric Augustin
Based on Vinay Sajip's branch.
2012-08-07[py3] Applied minor fixes so the test suite startsAymeric Augustin
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-07-24Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables.Ramiro Morales
Previously, the flush was done before the test case execution and now it is performed after it. Other changes to the testing infrastructure include: * TransactionTestCase now doesn't reset autoincrement sequences either (previous behavior can achieved by using `reset_sequences`.) With this, no implicit such reset is performed by any of the provided TestCase classes. * New ordering of test cases: All unittest tes cases are run first and doctests are run at the end. THse changes could be backward-incompatible with test cases that relied on some kind of state being preserved between tests. Please read the relevant sections of the release notes and testing documentation for further details. Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi Kääriäinen for the feedback and Anssi for reviewing. This also fixes #12408.
2012-07-22[py3] Switched to Python 3-compatible imports.Aymeric Augustin
xrange/range will be dealt with in a separate commit due to the huge number of changes.
2012-07-22[py3] Updated urllib/urllib2/urlparse imports.Aymeric Augustin
Lots of functions were moved. Use explicit imports in all cases to keey it easy to identify where the functions come from.
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-07-22[py3] Fixed remaining Python 3 syntax errors.Aymeric Augustin
django.utils.unittest.* weren't touched -- they're only imported on Python 2.6.
2012-07-22[py3] Switched to Python 3-compatible introspection.Aymeric Augustin
2012-07-22[py3] Used six.reraise wherever necessary.Aymeric Augustin
2012-07-21Made LiveServerTestCase to restore state on exit.Ramiro Morales
The piece of state is DB connections' allow_thread_sharing attribute which gets munged test are run when in-memory SQLite databases. Thanks Anssi for suggesting the possible root cause and Julien for implementing the fix.
2012-07-21Fixed #18395 -- Reset language-related global variables with setting_changedClaude Paroz
2012-06-09Reverted 905e33f, now that DatabaseFeatures does not need confirmClaude Paroz
Connection.features does not need to be confirmed any more, after commit aa42357, rendering obsolete the workaround when using TEST_MIRROR (Refs #16885, #17760).
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-25Fixed #17371 -- Made the test client more flexibleAymeric Augustin
The OPTIONS, PUT and DELETE methods no longer apply arbitrary data encoding (in the query string or in the request body).
2012-05-05Replaced cStringIO.StringIO by io.BytesIO.Claude Paroz
Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.
2012-05-05Made more extensive usage of context managers with open.Claude Paroz
2012-05-01Skip model validation when models are known good.Anssi Kääriäinen
In some situations Django calls model validation when the models are already known good. This is most visible in tests, which use flush and loaddata commands. This resulted in around 10% overhead when running tests under sqlite.
2012-04-30Replaced print statement by print function (forward compatibility syntax).Claude Paroz
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29Fixed #18023 -- Removed bundled simplejson.Aymeric Augustin
And started the deprecation path for django.utils.simplejson. Thanks Alex Ogier, Clueless, and other contributors for their work on the patch.
2012-04-29Simplified timezones tests with settings_changed.Aymeric Augustin
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ are changed in tests.
2012-04-24Fixed #17954 -- Fixed dependency checking for test databases. Thanks Łukasz ↵Claude Paroz
Rekucki for the report and the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09Fixed #17848 -- Added setting_changed signal for cases when ↵Claude Paroz
TEMPLATE_CONTEXT_PROCESSORS is overriden in tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed deprecated DjangoTestRunner.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed deprecated attribute Response.template in the test client. Refs #12226.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Removed some Python < 2.6 compatibility code. Refs #17965.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Removed with_statement imports, useless in Python >= 2.6. Refs #17965. ↵Claude Paroz
Thanks jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-15Reverted r16386 because it replaced a brittle method with another not lessRamiro Morales
arbitrary method when the test client checks for the presence of the bundled session backends+session middleware combination. We will revisit the issue soon, probably to make these checks even less strict. Refs #7836, #16605 git-svn-id: http://code.djangoproject.com/svn/django/trunk@17739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13Fixed #17882 (again) -- Updated the database connections' time zone when ↵Aymeric Augustin
time-zone-related settings are changed in tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13Fixed #17895 -- Made override_settings send the setting_changed signal both ↵Aymeric Augustin
when a setting is overridden and when it's restored. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13Fixed #17882 -- Reopened the database connection when a test changes time ↵Aymeric Augustin
zone settings. Thanks brodie for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-01Fixed #17730 - Renamed django.utils.htmlparser to django.utils.html_parser ↵Carl Meyer
to avoid shadowing stdlib HTMLParser in rare case-sensitivity situations. Thanks un33k for the report and gldnspud for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-03Made a bunch more edits up until [17418]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17428 bcc190cf-cafb-0310-a4f2-bffc1f526a37