summaryrefslogtreecommitdiff
path: root/tests/empty
AgeCommit message (Collapse)Author
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-09-24Removed numbering from the models.py header of some test packages.Loic Bistuer
This is a reliqua from the early days of the modeltests/regressiontests era.
2013-12-17Made it possible to create apps without a models module.Aymeric Augustin
This commit reverts f44c4a5d0f and 39bbd165. django.test.simple will be updated in a separate commit as it requires invasive changes.
2013-12-17Deprecated get_app().Aymeric Augustin
2013-12-17Added get_app_config() to look up app configs by label.Aymeric Augustin
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.
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
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.
2013-12-17Moved django.db.models.loading to django.apps.cache.Aymeric Augustin
This commit doesn't contain any code changes; it's purely a refactoring.
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-02-26Renamed some tests and removed references to modeltests/regressiontests.Florian Apolloner
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner