summaryrefslogtreecommitdiff
path: root/tests/empty
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag2014-11-031-2/+2
|
* Removed numbering from the models.py header of some test packages.Loic Bistuer2014-09-241-1/+1
| | | | This is a reliqua from the early days of the modeltests/regressiontests era.
* Made it possible to create apps without a models module.Aymeric Augustin2013-12-172-26/+0
| | | | | | | This commit reverts f44c4a5d0f and 39bbd165. django.test.simple will be updated in a separate commit as it requires invasive changes.
* Deprecated get_app().Aymeric Augustin2013-12-171-3/+2
|
* Added get_app_config() to look up app configs by label.Aymeric Augustin2013-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Refactored get_app() to rely on that method. get_app() starts by calling _populate(), which goes through INSTALLED_APPS and, for each app, imports the app module and attempts to import the models module. At this point, no further imports are necessary to return the models module for a given app. Therefore, the implementation of get_app() can be simplified and the safeguards for race conditions can be removed. Besides, the emptyOK parameter isn't used anywhere in Django. It was introduced in d6c95e93 but not actually used nor documented, and it has just been carried around since then. Since it's an obscure private API, it's acceptable to stop supporting it without a deprecation path. This branch aims at providing first-class support for applications without a models module eventually. For backwards-compatibility, get_app() still raises ImproperlyConfigured when an app isn't found, even though LookupError is technically more correct. I haven't gone as far as to preserve the exact error messages. I've adjusted a few tests instead.
* Removed module-level functions for the app cache.Aymeric Augustin2013-12-171-2/+2
| | | | | | | | | | | | | | | Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
* Moved django.db.models.loading to django.apps.cache.Aymeric Augustin2013-12-171-1/+1
| | | | This commit doesn't contain any code changes; it's purely a refactoring.
* Removed most of absolute_import importsClaude Paroz2013-07-291-2/+0
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Renamed some tests and removed references to modeltests/regressiontests.Florian Apolloner2013-02-262-2/+2
|
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-265-0/+56