/
settings.py
234 lines (223 loc) · 17.1 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# Copyright (c) Microsoft Corporation.
# Licensed under the BSD license.
DATABASES = {
"default": {
"ENGINE": "mssql",
"NAME": "default",
"USER": "sa",
"PASSWORD": "MyPassword42",
"HOST": "localhost",
"PORT": "1433",
"OPTIONS": {"driver": "ODBC Driver 17 for SQL Server", },
},
'other': {
"ENGINE": "mssql",
"NAME": "other",
"USER": "sa",
"PASSWORD": "MyPassword42",
"HOST": "localhost",
"PORT": "1433",
"OPTIONS": {"driver": "ODBC Driver 17 for SQL Server", },
},
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.staticfiles',
'django.contrib.auth',
'mssql',
'testapp',
)
SECRET_KEY = "django_tests_secret_key"
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
]
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
ENABLE_REGEX_TESTS = False
TEST_RUNNER = "testapp.runners.ExcludedTestSuiteRunner"
EXCLUDED_TESTS = ['aggregation.tests.AggregateTestCase.test_expression_on_aggregation',
'aggregation_regress.tests.AggregationTests.test_annotated_conditional_aggregate',
'aggregation_regress.tests.AggregationTests.test_annotation_with_value',
'aggregation.tests.AggregateTestCase.test_distinct_on_aggregate',
'annotations.tests.NonAggregateAnnotationTestCase.test_annotate_exists',
'custom_lookups.tests.BilateralTransformTests.test_transform_order_by',
'expressions.tests.BasicExpressionsTests.test_filtering_on_annotate_that_uses_q',
'expressions.tests.BasicExpressionsTests.test_order_by_exists',
'expressions.tests.ExpressionOperatorTests.test_righthand_power',
'expressions.tests.FTimeDeltaTests.test_datetime_subtraction_microseconds',
'expressions.tests.FTimeDeltaTests.test_duration_with_datetime_microseconds',
'expressions.tests.IterableLookupInnerExpressionsTests.test_expressions_in_lookups_join_choice',
'expressions_case.tests.CaseExpressionTests.test_annotate_with_in_clause',
'expressions_window.tests.WindowFunctionTests.test_nth_returns_null',
'expressions_window.tests.WindowFunctionTests.test_nthvalue',
'expressions_window.tests.WindowFunctionTests.test_range_n_preceding_and_following',
'field_deconstruction.tests.FieldDeconstructionTests.test_binary_field',
'ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery',
'queries.test_bulk_update.BulkUpdateNoteTests.test_set_field_to_null',
'get_or_create.tests.UpdateOrCreateTransactionTests.test_creation_in_transaction',
'indexes.tests.PartialIndexTests.test_multiple_conditions',
'introspection.tests.IntrospectionTests.test_get_constraints',
'migrations.test_executor.ExecutorTests.test_alter_id_type_with_fk',
'migrations.test_operations.OperationTests.test_add_constraint_percent_escaping',
'migrations.test_operations.OperationTests.test_alter_field_pk',
'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_target_changes',
'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_changes',
'migrations.test_operations.OperationTests.test_alter_field_with_index',
'migrations.test_operations.OperationTests.test_autofield_foreignfield_growth',
'migrations.test_operations.OperationTests.test_rename_field_reloads_state_on_fk_target_changes',
'migrations.test_operations.OperationTests.test_rename_m2m_model_after_rename_field',
'migrations.test_operations.OperationTests.test_rename_model_with_superclass_fk',
'migrations.test_operations.OperationTests.test_rename_referenced_field_state_forward',
'schema.tests.SchemaTests.test_alter_auto_field_to_char_field',
'schema.tests.SchemaTests.test_alter_auto_field_to_integer_field',
'schema.tests.SchemaTests.test_alter_implicit_id_to_explicit',
'schema.tests.SchemaTests.test_alter_int_pk_to_autofield_pk',
'schema.tests.SchemaTests.test_alter_int_pk_to_bigautofield_pk',
'schema.tests.SchemaTests.test_alter_pk_with_self_referential_field',
'schema.tests.SchemaTests.test_no_db_constraint_added_during_primary_key_change',
'schema.tests.SchemaTests.test_remove_field_check_does_not_remove_meta_constraints',
'schema.tests.SchemaTests.test_remove_field_unique_does_not_remove_meta_constraints',
'schema.tests.SchemaTests.test_text_field_with_db_index',
'schema.tests.SchemaTests.test_unique_together_with_fk',
'schema.tests.SchemaTests.test_unique_together_with_fk_with_existing_index',
'aggregation.tests.AggregateTestCase.test_count_star',
'aggregation_regress.tests.AggregationTests.test_values_list_annotation_args_ordering',
'constraints.tests.CheckConstraintTests.test_database_constraint',
'constraints.tests.CheckConstraintTests.test_name',
'constraints.tests.UniqueConstraintTests.test_name',
'constraints.tests.UniqueConstraintTests.test_database_constraint',
'datatypes.tests.DataTypesTestCase.test_error_on_timezone',
'db_functions.math.test_degrees.DegreesTests.test_integer',
'db_functions.math.test_power.PowerTests.test_integer',
'db_functions.math.test_radians.RadiansTests.test_integer',
'db_functions.text.test_pad.PadTests.test_pad',
'db_functions.text.test_replace.ReplaceTests.test_case_sensitive',
'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_right_shift_operator',
'expressions.tests.FTimeDeltaTests.test_invalid_operator',
'fixtures_regress.tests.TestFixtures.test_loaddata_raises_error_when_fixture_has_invalid_foreign_key',
'inspectdb.tests.InspectDBTestCase.test_introspection_errors',
'invalid_models_tests.test_ordinary_fields.TextFieldTests.test_max_length_warning',
'model_indexes.tests.IndexesTests.test_db_tablespace',
'ordering.tests.OrderingTests.test_deprecated_values_annotate',
'queries.test_qs_combinators.QuerySetSetOperationTests.test_limits',
'backends.tests.BackendTestCase.test_unicode_password',
'introspection.tests.IntrospectionTests.test_get_table_description_types',
'migrations.test_commands.MigrateTests.test_migrate_syncdb_app_label',
'migrations.test_commands.MigrateTests.test_migrate_syncdb_deferred_sql_executed_with_schemaeditor',
'migrations.test_operations.OperationTests.test_alter_field_pk_fk',
'migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint',
'migrations.test_operations.OperationTests.test_rename_field',
'schema.tests.SchemaTests.test_add_foreign_key_quoted_db_table',
'schema.tests.SchemaTests.test_unique_and_reverse_m2m',
'schema.tests.SchemaTests.test_unique_no_unnecessary_fk_drops',
'select_for_update.tests.SelectForUpdateTests.test_for_update_after_from',
'backends.tests.LastExecutedQueryTest.test_last_executed_query',
'constraints.tests.CheckConstraintTests.test_abstract_name',
'constraints.tests.CheckConstraintTests.test_name',
'db_functions.datetime.test_now.NowTests.test_basic',
'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_exact_lookup',
'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_greaterthan_lookup',
'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_lessthan_lookup',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_year_exact_lookup',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_year_greaterthan_lookup',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_year_lessthan_lookup',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_ambiguous_and_invalid_times',
'delete.tests.DeletionTests.test_only_referenced_fields_selected',
'queries.test_db_returning.ReturningValuesTests.test_insert_returning',
'queries.test_db_returning.ReturningValuesTests.test_insert_returning_non_integer',
'backends.tests.BackendTestCase.test_queries',
'introspection.tests.IntrospectionTests.test_smallautofield',
'schema.tests.SchemaTests.test_inline_fk',
'aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_exists',
'aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values_collision',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_func_with_timezone',
'db_functions.text.test_md5.MD5Tests.test_basic',
'db_functions.text.test_md5.MD5Tests.test_transform',
'db_functions.text.test_sha1.SHA1Tests.test_basic',
'db_functions.text.test_sha1.SHA1Tests.test_transform',
'db_functions.text.test_sha224.SHA224Tests.test_basic',
'db_functions.text.test_sha224.SHA224Tests.test_transform',
'db_functions.text.test_sha256.SHA256Tests.test_basic',
'db_functions.text.test_sha256.SHA256Tests.test_transform',
'db_functions.text.test_sha384.SHA384Tests.test_basic',
'db_functions.text.test_sha384.SHA384Tests.test_transform',
'db_functions.text.test_sha512.SHA512Tests.test_basic',
'db_functions.text.test_sha512.SHA512Tests.test_transform',
'expressions.tests.BasicExpressionsTests.test_case_in_filter_if_boolean_output_field',
'expressions.tests.BasicExpressionsTests.test_subquery_in_filter',
'expressions.tests.FTimeDeltaTests.test_date_subquery_subtraction',
'expressions.tests.FTimeDeltaTests.test_datetime_subquery_subtraction',
'expressions.tests.FTimeDeltaTests.test_time_subquery_subtraction',
'expressions.tests.BasicExpressionsTests.test_filtering_on_q_that_is_boolean',
'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_type_change',
'migrations.test_operations.OperationTests.test_autofield__bigautofield_foreignfield_growth',
'migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth',
'migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth',
'schema.tests.SchemaTests.test_alter_auto_field_quoted_db_column',
'schema.tests.SchemaTests.test_alter_autofield_pk_to_bigautofield_pk_sequence_owner',
'schema.tests.SchemaTests.test_alter_autofield_pk_to_smallautofield_pk_sequence_owner',
'schema.tests.SchemaTests.test_alter_primary_key_quoted_db_table',
'schema.tests.SchemaTests.test_alter_smallint_pk_to_smallautofield_pk',
'annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation',
'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields',
'db_functions.comparison.test_cast.CastTests.test_cast_to_integer',
'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_func',
'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_iso_weekday_func',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_func',
'constraints.tests.CheckConstraintTests.test_database_constraint_expression',
'constraints.tests.CheckConstraintTests.test_database_constraint_expressionwrapper',
'constraints.tests.UniqueConstraintTests.test_database_constraint_with_condition',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_iso_weekday_func',
'datetimes.tests.DateTimesTests.test_datetimes_ambiguous_and_invalid_times',
'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor',
'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_null',
'inspectdb.tests.InspectDBTestCase.test_number_field_types',
'inspectdb.tests.InspectDBTestCase.test_json_field',
'ordering.tests.OrderingTests.test_default_ordering_by_f_expression',
'ordering.tests.OrderingTests.test_order_by_nulls_first',
'ordering.tests.OrderingTests.test_order_by_nulls_last',
'queries.test_bulk_update.BulkUpdateTests.test_json_field',
'queries.test_qs_combinators.QuerySetSetOperationTests.test_ordering_by_f_expression_and_alias',
'queries.test_db_returning.ReturningValuesTests.test_insert_returning_multiple',
'dbshell.tests.DbshellCommandTestCase.test_command_missing',
'schema.tests.SchemaTests.test_char_field_pk_to_auto_field',
'datetimes.tests.DateTimesTests.test_21432',
'migrations.test_operations.OperationTests.test_rename_model_with_m2m',
# JSONFields
'model_fields.test_jsonfield.TestQuerying.test_has_key_list',
'model_fields.test_jsonfield.TestQuerying.test_has_key_null_value',
'model_fields.test_jsonfield.TestQuerying.test_key_quoted_string',
'model_fields.test_jsonfield.TestQuerying.test_lookups_with_key_transform',
'model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_count',
'model_fields.test_jsonfield.TestQuerying.test_isnull_key',
'model_fields.test_jsonfield.TestQuerying.test_none_key',
'model_fields.test_jsonfield.TestQuerying.test_none_key_and_exact_lookup',
'model_fields.test_jsonfield.TestQuerying.test_key_escape',
'model_fields.test_jsonfield.TestQuerying.test_ordering_by_transform',
'expressions_window.tests.WindowFunctionTests.test_key_transform',
# Django 3.2
'constraints.tests.CheckConstraintTests.test_database_constraint_unicode',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_func_with_timezone',
'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_timezone_applied_before_truncation',
'expressions.tests.ExistsTests.test_optimizations',
'expressions.tests.FTimeDeltaTests.test_delta_add',
'expressions.tests.FTimeDeltaTests.test_delta_subtract',
'expressions.tests.FTimeDeltaTests.test_delta_update',
'expressions.tests.FTimeDeltaTests.test_exclude',
'expressions.tests.FTimeDeltaTests.test_mixed_comparisons1',
'expressions.tests.FTimeDeltaTests.test_negative_timedelta_update',
'inspectdb.tests.InspectDBTestCase.test_field_types',
'lookup.tests.LookupTests.test_in_ignore_none',
'lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items',
'queries.test_qs_combinators.QuerySetSetOperationTests.test_exists_union',
'introspection.tests.IntrospectionTests.test_get_constraints_unique_indexes_orders',
'schema.tests.SchemaTests.test_ci_cs_db_collation',
'select_for_update.tests.SelectForUpdateTests.test_unsuported_no_key_raises_error',
]
REGEX_TESTS = ['lookup.tests.LookupTests.test_regex',
'lookup.tests.LookupTests.test_regex_backreferencing',
'lookup.tests.LookupTests.test_regex_non_ascii',
'lookup.tests.LookupTests.test_regex_non_string',
'lookup.tests.LookupTests.test_regex_null',
'model_fields.test_jsonfield.TestQuerying.test_key_iregex',
'model_fields.test_jsonfield.TestQuerying.test_key_regex',
]