1
0
mirror of https://github.com/django/django.git synced 2024-11-18 15:34:16 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Shai Berger
071801ccff Cleanup: Removed the try-except-fail antipattern from tests
Found cases where testing code was doing

    try:
        whatever
    except (some excption type):
        self.fail("exception shouldn't be thrown")

replaced it with just

    whatever

as this makes the unexpected errors easier to debug, and the tests
would fail just as much and aren't rendered less readable.

Thanks Markus Holtermann for review
2015-06-05 12:57:20 +03:00
Claude Paroz
6b6d13bf6e Stopped conditional discovery of gis_tests apps
Refs #23879.
2015-04-18 15:17:49 +02:00
Claude Paroz
a6bada1ee0 Revert "Removed unneeded app_label definitions in gis_tests"
This reverts commit e0cc36f615.
The problem is the following:
  * With non-gis backends, gis_tests sub apps are not discovered
    (see runtests.py)
  * Consequently, the app_label is inferred from the gis_tests
    AppConfig
  * Then models with same names in different sub apps conflict
    because of same model_name/app_label pair.
2015-03-21 16:59:30 +01:00
Claude Paroz
e0cc36f615 Removed unneeded app_label definitions in gis_tests 2015-03-21 16:10:24 +01:00
Loic Bistuer
bed504d70b Fixed #24351, #24346 -- Changed the signature of allow_migrate().
The new signature enables better support for routing RunPython and
RunSQL operations, especially w.r.t. reusable and third-party apps.

This commit also takes advantage of the deprecation cycle for the old
signature to remove the backward incompatibility introduced in #22583;
RunPython and RunSQL won't call allow_migrate() when when the router
has the old signature.

Thanks Aymeric Augustin and Tim Graham for helping shape up the patch.

Refs 22583.
2015-02-20 21:34:09 +07:00
Tim Graham
ad0be620ae Moved contrib.gis tests out of contrib. 2015-02-11 10:29:54 -05:00