Commit Graph

5967 Commits

Author SHA1 Message Date
Tim Graham 1e64a1e7b1 Fixed flake8 warnings. 2014-10-28 10:12:10 -04:00
Rigel Di Scala 28634394f5 Fixed #23606 -- Implemented Client and RequestFactory trace() methods.
Thanks KevinEtienne for the suggestion.
2014-10-28 10:11:12 -04:00
Collin Anderson ae7cb992bc Fixed #23721 -- check_related_objects without calling __iter__
Refs #14334
2014-10-28 10:13:50 +02:00
Thomas Chaumeny 00aa562884 Fixed #23493 -- Added bilateral attribute to Transform 2014-10-28 10:02:10 +02:00
Claude Paroz 528c9af543 Fixed #23717 -- Fixed makemessages crash when STATIC_ROOT=None 2014-10-27 13:56:25 +01:00
Tony Zhu dd1ea70779 Fixed #23699 -- Prevented flush from loading initial data for apps with migrations. 2014-10-27 06:56:44 -04:00
Claude Paroz 7f089ac2e3 Fixed #23446 -- Officially recommended mysqlclient as MySQL driver
Thanks Corey Farwell for the report and Tim Graham for the review.
Thanks also to Inada Naoki for creating and maintaining mysqlclient.
2014-10-27 09:11:33 +01:00
Claude Paroz 45db842c9b Fixed #23652 -- Restored database name after destroying test database
Thanks Bjarkias for the report.
2014-10-24 17:04:43 +02:00
Claude Paroz 2c9a03d487 Fixed #23707 -- Prevented discovery of duplicated tests 2014-10-23 21:03:57 +02:00
Tim Graham 92269b7b53 Fixed #23702 -- Fixed adding an explicit id field on SQLite.
Thanks gavinwahl for the report.
2014-10-23 12:24:34 -04:00
a1tus 2d75515a4c Fixed #23444 -- Deprecated django.contrib.admin.helpers.InlineAdminForm.original_content_type_id 2014-10-23 09:49:24 -04:00
Claude Paroz 70428902c0 Added missing available app in migrations test case
In some test combinations, having contrib.auth available but not
contrib.contenttypes can produce failures while creating permissions.
2014-10-23 15:39:26 +02:00
Tim Graham 41b337efa0 Fixed #23630 -- Made AlterModelTable rename auto-created M2M tables.
Thanks Naddiseo for the report, Andrew Godwin for guidance,
and Shai Berger for review.
2014-10-23 08:05:39 -04:00
Claude Paroz bc6caa5d45 Made a doctest compatible with Python 2
That test might not always execute, but can be executed when the
parent test label is explicitely given.
2014-10-23 11:16:17 +02:00
Tim Graham ef9e3c5ed8 Fixed flake8 warning. 2014-10-22 21:21:02 -04:00
Tim Graham 28da093ae2 Allowed test from refs #23612 to be run from a directory other than tests. 2014-10-22 15:24:33 -04:00
Loic Bistuer b62f72498a Improved warning message when reloading models. Refs #23621.
Thanks dfunckt and Tim Graham.
2014-10-23 01:46:04 +07:00
Loic Bistuer 8c4ca16c65 Fixed #23621 -- Warn for duplicate models when a module is reloaded.
Previously a RuntimeError was raised every time two models clashed
in the app registry. This prevented reloading a module in a REPL;
while it's not recommended to do so, we decided not to forbid this
use-case by turning the error into a warning.

Thanks @dfunckt and Sergey Pashinin for the initial patches.
2014-10-23 00:55:02 +07:00
Loic Bistuer eb82fb0a9d Refactored color_style() and no_style() to improve testability. Refs #23663.
This includes the following improvements:

- The type of the style object is now called 'Style' rather than 'dummy'.
- The new make_style() function allows generating a Style object directly
  from a config string. Before the only way to get a style object was
  through the environ and it also required that the terminal supported
  colors which isn't necessarily the case when testing.
- The output of no_style() is now cached with @lru_cache.
- The output of no_style() now has the same set of attributes as the
  other Style objects. Previously it allowed anything to pass through
  with __getattr__.
2014-10-22 11:27:00 +07:00
Loic Bistuer bdb4118b1a Fixed #23686 -- Tweak color output of the system check framework.
Thanks Tim Graham for the review.
2014-10-22 11:27:00 +07:00
Loic Bistuer 494ba051bb Made testing of stdout and stderr more consistent.
Refs #23663.
2014-10-22 09:25:50 +07:00
Loic Bistuer 533532302a Fixed #23663 -- Initialize output streams for BaseCommand in __init__().
This helps with testability of management commands.

Thanks to trac username daveoncode for the report and to
Tim Graham and Claude Paroz for the reviews.
2014-10-22 09:25:50 +07:00
Tim Graham 494cd857c8 Fixed #23653 -- Fixed Windows failure of a logging test added in refs #23569. 2014-10-21 18:32:46 -04:00
Claude Paroz bbc3505ef8 Removed unneeded override_system_checks
Refs #23685.
2014-10-21 20:54:32 +02:00
Claude Paroz 8b4cc9df9c Fixed #23583 -- More selectively ignored static/media roots
Fixed a regression introduced by 28efafa24c.
Thanks Michal Čihař for the report and initial patch, and
Collin Anderson and Tim Graham for the reviews.
2014-10-21 20:18:21 +02:00
Loic Bistuer c34e13e17c Fixed #23107 -- Made runserver output respect --no-color.
This commit reverts 67d7da5fb9.

The previous fix changed the environment globally, which meant
that any call to `call_command(no_color=True)` prevented further
`call_command` with color.

This fix still relies on the environment because it's currently the only
way to reach WSGIRequestHandler, but it's now limited to the `runserver`
command. This seems an acceptable compromise considering `runserver` runs
indefinitely.

Thanks Tim Graham for the review.
2014-10-22 01:03:15 +07:00
Anton Novosyolov 9f1202c166 Fixed #23695 -- Made condition decorator work for HEAD requests without ETag. 2014-10-21 11:13:29 -04:00
Gabe Jackson 0e16c3e3cd Fixed #23396 -- Ensured ValueQuerySets are not checked by check_related_objects. 2014-10-21 10:02:51 -04:00
Claude Paroz f0bb3c98cc Fixed #21740 -- Allowed test client data to be an empty string
This fixes a regression introduced by 2a31d00933.
Thanks tony-zhu for the report.
2014-10-21 09:16:57 +02:00
Michael Manfre edcb33c92e Fix SettingsCustomLoggingTest on Windows when path contains \u 2014-10-20 21:49:44 -04:00
John-Scott Atlakson dbf7a3df45 Fixed #23688 -- Updated cached_property to preserve docstring of original function 2014-10-20 17:59:07 -04:00
Jon Dufresne 54e695331b Fixed #20221 -- Allowed some functions that use mark_safe() to result in SafeText.
Thanks Baptiste Mispelon for the report.
2014-10-20 17:08:29 -04:00
Claude Paroz 4fe6824ffd Fixed #23679 -- Fixed null introspection for char/text fields
Thanks Paul Dejean for the report.
2014-10-20 22:37:19 +02:00
Tianyi Wang 5732424bee Fixed #23629 -- Allowed autodetector to detect changes in Meta.db_table.
Thanks Naddiseo for reporting.
2014-10-20 13:14:44 -04:00
Claude Paroz 6d11bb102d Revert "Fixed #23650 -- Prevented migrate from calling checks 3 times"
This reverts commit 8d6e1afe0b.
call_command now always set skip_checks to True (tested in
user_commands).
2014-10-20 17:26:00 +02:00
Claude Paroz 685edab9da Fixed #23685 -- Made call_command skip checks by default
Thanks Loic Bistuer for the report/review and Tim Graham for the
review.
2014-10-20 17:26:00 +02:00
Loic Bistuer 968510e5d7 Moved a test case that caused deprecation warnings.
`cache.tests.TestEtagWithAdmin` loaded views from the `admin_views` test
package. This is problematic because when the `cache` test package is
run in isolation, `admin_views` isn't in INSTALLED_APPS, and therefore
loading its models isn't allowed since the app loading refactor.
2014-10-20 00:22:48 +07:00
Nicholas Serra 6c79d32977 Fixed #23684 -- Used correct package name for Pillow in Error hint. 2014-10-19 13:46:46 +07:00
Thomas Chaumeny 825ea83858 Fixed #21196 -- Removed index on test field causing MySQL specific warning. 2014-10-19 13:44:39 +07:00
Claude Paroz 8d6e1afe0b Fixed #23650 -- Prevented migrate from calling checks 3 times
Thanks Ilya Baryshev for the report and Tim Graham for the review.
2014-10-17 20:20:56 +02:00
Tim Graham 7ae03204ac Fixed #23469 -- Removed test runner compatibility check which often yielded false positives. 2014-10-17 10:31:49 -04:00
Rigel Di Scala a5c77417a6 Fixed #23615 -- Validate that a Model instance's "check" attribute is a method.
The "check" name is a reserved word used by Django's check framework,
and cannot be redefined as something else other than a method, or the check
framework will raise an error.

This change amends the django.core.checks.model_check.check_all_models()
function, so that it verifies that a model instance's attribute "check"
is actually a method. This new check is assigned the id "models.E020".
2014-10-16 23:49:21 +07:00
Loic Bistuer 157f9cf240 Minor cleanup in the check_framework test package. 2014-10-16 23:49:21 +07:00
Thomas Chaumeny b962653060 Fixed #23664 -- Provided a consistent definition for OrderedSet.__bool__
This also defines QuerySet.__bool__ for consistency though this should not have any consequence as bool(qs) used to fallback on QuerySet.__len__ in Py3.
2014-10-16 14:16:24 +02:00
Claude Paroz 374c14b7fd Fixed #23659 -- Kept annotate() args ordering
Thanks Loic Bistuer and Simon Charette for the review.
2014-10-16 09:27:20 +02:00
Simon Charette f6c208d95c Fixed a flake8 warning. 2014-10-15 16:36:11 -04:00
Collin Anderson a6a8268d19 Fixed #23660 -- Moved sort_dependencies to core. 2014-10-16 03:04:13 +07:00
Anubhav Joshi 10b17a22be Fixed #19508 -- Implemented uri_to_iri as per RFC.
Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz
for the review.
2014-10-16 02:31:17 +07:00
Florian Apolloner 3af5af1a61 Fixed remaining test failure in jslex tests. 2014-10-15 17:36:19 +02:00
Florian Apolloner 2ccbaba1f2 Added unicode_literals to the jslexer.
This ensure that ''.join(c) in jslex.py always returns text.
2014-10-15 15:09:35 +02:00