0
0
mirror of https://github.com/django/django.git synced 2024-11-30 23:20:50 +01:00
django/tests
François Freitag ee1c1c696b Made prefetch_related SQL inspection tests less brittle.
After refs #16614, integers might appear outside the WHERE clause.
2017-01-09 11:18:32 -05:00
..
absolute_url_overrides
admin_autodiscover
admin_changelist Fixed #18729 -- Made admin changelist not use distinct() if a list_filter doesn't require it. 2016-12-06 10:38:38 -05:00
admin_checks Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
admin_custom_urls Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
admin_docs Fixed #26621 -- Corrected simplify_regex()'s handling of named capture groups. 2017-01-03 13:55:11 -05:00
admin_filters Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
admin_inlines Fixed #15667 -- Added template-based widget rendering. 2016-12-27 17:50:10 -05:00
admin_ordering Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
admin_registration
admin_scripts Fixed #27626 -- Moved MEDIA_URL/STATIC_URL validation to a system check. 2016-12-23 10:55:00 -05:00
admin_utils Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
admin_views Refs #26961 -- Fixed invalid ModelAdmins in tests. 2017-01-07 10:06:51 -05:00
admin_widgets Fixed #15667 -- Added template-based widget rendering. 2016-12-27 17:50:10 -05:00
aggregation Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
aggregation_regress Fixed #27632 -- Unified query parameters by their values on Oracle. 2016-12-28 08:14:14 -05:00
annotations Fixed #27481 -- Made SQLite return annotated boolean values as boolean, not integer. 2016-11-14 14:47:20 -05:00
app_loading
apps Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
auth_tests Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
backends Fixed #27649 -- Bumped required cx_Oracle to 5.2. 2016-12-29 12:45:25 -05:00
base Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
bash_completion
basic Moved test_field_ordering to the model_fields package. 2016-12-14 13:35:13 -05:00
builtin_server Removed a bit of builtin_server tests for Python ≤ 2.7.3. 2016-11-10 22:20:09 -05:00
bulk_create
cache Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
check_framework Fixed #25415 -- Made DiscoverRunner run system checks. 2016-12-29 12:33:24 -05:00
choices
conditional_processing
contenttypes_tests Simplified a contenttypes check test with mock. 2017-01-07 10:24:40 -05:00
context_processors Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
csrf_tests Moved csrf_tests views to a spearate file. 2016-11-30 18:24:29 -05:00
custom_columns
custom_lookups
custom_managers Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
custom_methods
custom_migration_operations
custom_pk
datatypes
dates
datetimes
db_functions Removed an unused function argument in db_functions test. 2016-11-11 17:42:34 -05:00
db_typecasts
dbshell
decorators Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
defer Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
defer_regress
delete Fixed #27407 -- Made Model.delete(keep_parents=True) preserve parent reverse relationships. 2016-11-15 20:16:06 -05:00
delete_regress
deprecation
dispatch Completed django.dispatch test coverage. 2016-11-22 09:07:42 -05:00
distinct_on_fields
empty
expressions Fixed #25912 -- Added binary left/right shift operators to F expressions. 2017-01-03 14:15:46 -05:00
expressions_case Fixed #27482 -- Doc'd an example of Case() in QuerySet.filter(). 2016-11-17 12:39:35 -05:00
extra_regress Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
field_deconstruction
field_defaults
field_subclassing
file_storage Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
file_uploads Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
files Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
fixtures Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
fixtures_model_package
fixtures_regress Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
flatpages_tests
force_insert_update
foreign_object Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
forms_tests Refs #15667 -- Prevented newlines in attrs.html widget rendering. 2017-01-06 19:11:32 -05:00
from_db_value
generic_inline_admin Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
generic_relations Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
generic_relations_regress Fixed #27463 -- Fixed E741 flake8 warnings. 2016-11-14 17:40:28 -05:00
generic_views Imported specific models in a few tests that didn't. 2016-12-08 11:14:15 -05:00
get_earliest_or_latest Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
get_object_or_404
get_or_create
gis_tests Refs #25004 -- Fixed test failure introduced by OpenLayers 3 update. 2017-01-03 11:11:00 -05:00
handlers Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
httpwrappers Fixed #27640 -- Fixed HttpResponse's __repr__() without a 'Content-Type' header. 2016-12-27 14:42:58 -05:00
humanize_tests
i18n Fixed #24423 -- Reorganized i18n tag tests. 2017-01-06 10:33:07 -05:00
import_error_package
indexes Refs #27558 -- Isolated indexes test on MySQL. 2016-12-15 13:31:08 -05:00
inline_formsets
inspectdb Fixed #27700 -- Optimized inspectdb tests by specifying database tables. 2017-01-07 15:41:42 -05:00
introspection Refs #19884 -- Removed DatabaseFeatures.can_introspect_max_length. 2016-12-19 16:16:11 -05:00
invalid_models_tests Refs #25415 -- Made MySQL backend skip field validation of unsupported models. 2016-12-29 12:01:48 -05:00
known_related_objects Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
logging_tests Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
lookup Fixed #27498 -- Fixed filtering on annotated DecimalField on SQLite. 2016-12-24 10:38:48 -05:00
m2m_and_m2o
m2m_intermediary
m2m_multiple
m2m_recursive Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
m2m_regress Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
m2m_signals Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
m2m_through Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
m2m_through_regress Fixed typo in m2m_through_regress test methods. 2016-12-23 15:32:30 -05:00
m2o_recursive
mail Fixed #27696 -- Measured email long lines on encoded content 2017-01-06 16:04:59 +01:00
managers_regress
many_to_many Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
many_to_one Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
many_to_one_null Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
max_lengths Refs #27358 -- Removed invalid/unneeded FileField.upload_to in tests/docs. 2016-11-30 17:05:31 -05:00
messages_tests Cosmetic edits for messages_tests. 2017-01-05 09:31:23 -05:00
middleware Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
middleware_exceptions Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
migrate_signals
migration_test_data_persistence Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
migrations Fixed test isolation in a couple migrations tests. 2017-01-09 08:02:09 -05:00
migrations2
model_fields Added a test for NullBooleanField.formfield(). 2016-12-20 07:57:25 -05:00
model_forms Fixed #27370 -- Prevented Select widget from using 'required' with a non-empty first value. 2016-12-28 10:45:22 -05:00
model_formsets Fixed #27416 -- Prevented ModelFormSet from creating objects for invalid PKs in data. 2016-12-06 13:06:58 -05:00
model_formsets_regress
model_indexes
model_inheritance Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
model_inheritance_regress Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
model_meta Fixed #27532 -- Deprecated Model._meta.has_auto_field 2016-11-25 13:24:11 -05:00
model_options Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
model_package
model_permalink
model_regress Fixed #27514 -- Tested Model.__init__ excessive number of fields. 2016-11-20 13:21:59 -05:00
modeladmin Fixed #26632 -- Skipped admin.E111 list_display_links check if get_list_display() is overridden. 2016-12-22 09:32:11 -05:00
multiple_database Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
mutually_referential
nested_foreign_keys
no_models Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
null_fk
null_fk_ordering
null_queries
one_to_one Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
or_lookups
order_with_respect_to
ordering Fixed #13312 -- Allowed specifying the order of null fields in queries. 2016-12-08 09:54:07 -05:00
pagination Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
postgres_tests Fixed #27693, Refs #27257 -- Fixed iexact lookup on JSONField keys. 2017-01-06 19:25:32 -05:00
prefetch_related Made prefetch_related SQL inspection tests less brittle. 2017-01-09 11:18:32 -05:00
project_template
properties
proxy_model_inheritance
proxy_models
queries Fixed #27463 -- Fixed E741 flake8 warnings. 2016-11-14 17:40:28 -05:00
queryset_pickle Fixed #27499 -- Made Prefetches pickle without evaluating their QuerySet. 2016-11-23 11:23:14 -05:00
raw_query Refs #27546 -- Tested some __repr__() methods. 2016-12-01 08:09:38 -05:00
redirects_tests
requests Refs #17235 -- Made MultiPartParser leave request.POST immutable. 2016-12-07 08:28:46 -05:00
requirements Require Jinja2 >= 2.9.2 in test requirements. 2017-01-08 18:43:24 +01:00
reserved_names
resolve_url Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
responses Fixed #27640 -- Fixed HttpResponse's __repr__() without a 'Content-Type' header. 2016-12-27 14:42:58 -05:00
reverse_lookup
save_delete_hooks
schema Fixed #27458 -- Fixed invalid sequence/index names when using "USER"."TABLE" db_table on Oracle. 2016-12-30 17:11:12 -05:00
select_for_update Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
select_related
select_related_onetoone Fixed #27594 -- Fixed select_related() with reverse self-referential OneToOneField. 2016-12-14 07:46:27 -05:00
select_related_regress
serializers Refs #27546 -- Tested some __repr__() methods. 2016-12-01 08:09:38 -05:00
servers Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
sessions_tests Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
settings_tests Fixed #27626 -- Moved MEDIA_URL/STATIC_URL validation to a system check. 2016-12-23 10:55:00 -05:00
shell Fixed #27600 -- Suppressed the REPL during shell's reading from stdin. 2016-12-21 17:05:33 -05:00
shortcuts
signals Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
signed_cookies_tests
signing
sitemaps_tests Added tests for contrib.sitemaps.ping_google(). 2016-11-22 18:27:19 -05:00
sites_framework
sites_tests Fixed #27181 -- Allowed contrib.sites to match domains with trailing ".". 2016-11-29 18:17:10 -05:00
staticfiles_tests Fixed #27658 -- Prevented collectstatic from overwriting newer files in remote storages. 2017-01-04 12:50:31 -05:00
str
string_lookup Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
swappable_models Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
syndication_tests Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
template_backends Fixed #27258 -- Prohibited django.Template.render() with non-dict context. 2016-12-28 16:03:20 -05:00
template_loader
template_tests Fixed #24423 -- Reorganized i18n tag tests. 2017-01-06 10:33:07 -05:00
templates Fixed #27313 -- Allowed overriding admin popup response template. 2016-12-14 18:10:56 -05:00
test_client Refs #27184 -- Fixed unclosed file ResourceWarning in test_client test. 2016-12-12 12:41:38 -05:00
test_client_regress Fixed #27698 -- Added django.test.utils.ContextList.get() 2017-01-06 19:23:42 -05:00
test_discovery_sample
test_discovery_sample2
test_exceptions
test_runner Refs #25415 -- Fixed/silenced check errors in Django's test suite. 2016-12-28 15:16:10 -05:00
test_utils Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
timezones Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
transaction_hooks
transactions Refs #16682 -- Replaced signal number with equivalent signal.SIGINT. 2016-11-25 07:07:57 -05:00
unmanaged_models
update Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
update_only_fields Refs #26207 -- Removed obsolete comments about deferred model classes. 2016-11-20 18:22:13 -05:00
urlpatterns_reverse Fixed #27648 -- Deprecated (iLmsu) regex groups in url() patterns. 2016-12-27 15:59:13 -05:00
user_commands Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
utils_tests Refs #27637 -- Fixed timesince, timeuntil on New Year's Eve in a leap year. 2017-01-02 08:40:44 -05:00
validation
validators Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
version Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
view_tests Fixed #27418 -- Fixed occasional missing plural forms in JavaScriptCatalog. 2016-12-14 18:20:30 -05:00
wsgi Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
.coveragerc
README.rst
runtests.py Refs #25415 -- Fixed/silenced check errors in Django's test suite. 2016-12-28 15:16:10 -05:00
test_sqlite.py
urls.py

To run the test suite, first, create and activate a virtual environment. Then
install some requirements and run the tests::

    $ cd tests
    $ pip install -e ..
    $ pip install -r requirements/py3.txt  # or py2.txt
    $ ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.