Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b60072d

Browse files
committedDec 5, 2021
Add more Django test apps to CI
1 parent 37209f9 commit b60072d

File tree

2 files changed

+151
-0
lines changed

2 files changed

+151
-0
lines changed
 

‎.github/workflows/tests.yml

+89
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,114 @@ jobs:
3636
- name: Run the tests
3737
run: >
3838
python3 django_repo/tests/runtests.py --settings snowflake_settings -v 2
39+
admin_changelist
40+
admin_custom_urls
41+
admin_docs
42+
admin_filters
43+
admin_inlines
44+
admin_ordering
45+
admin_utils
46+
admin_views
3947
aggregation
4048
aggregation_regress
4149
annotations
50+
auth_tests
4251
backends
4352
basic
4453
bulk_create
54+
cache
55+
check_framework
56+
constraints
57+
contenttypes_tests
58+
custom_columns
59+
custom_lookups
60+
custom_managers
61+
custom_methods
62+
custom_pk
63+
datatypes
4564
dates
4665
datetimes
4766
db_functions
67+
db_typecasts
68+
db_utils
69+
defer
70+
defer_regress
71+
delete
72+
delete_regress
73+
empty
4874
expressions
75+
expressions_case
4976
expressions_window
77+
field_defaults
78+
field_subclassing
79+
file_storage
80+
file_uploads
81+
filtered_relation
82+
foreign_object
83+
forms_tests
84+
from_db_value
85+
generic_inline_admin
86+
generic_relations
87+
generic_relations_regress
88+
generic_views
89+
get_earliest_or_latest
90+
get_object_or_404
91+
inline_formsets
5092
inspectdb
5193
introspection
94+
invalid_models_tests
95+
known_related_objects
5296
lookup
97+
m2m_and_m2o
98+
m2m_intermediary
99+
m2m_multiple
100+
m2m_recursive
101+
m2m_regress
102+
m2m_signals
103+
m2m_through
104+
m2m_through_regress
105+
m2o_recursive
106+
managers_regress
107+
many_to_many
108+
many_to_one
109+
many_to_one_null
110+
max_lengths
111+
migrate_signals
53112
migrations
113+
migration_test_data_persistence
114+
modeladmin
54115
model_fields
116+
mutually_referential
117+
nested_foreign_keys
118+
null_fk
119+
null_fk_ordering
120+
null_queries
121+
one_to_one
122+
order_with_respect_to
123+
or_lookups
124+
pagination
125+
prefetch_related
126+
properties
127+
proxy_model_inheritance
128+
proxy_models
55129
queries
130+
queryset_pickle
131+
reserved_names
132+
reverse_lookup
133+
save_delete_hooks
56134
schema
135+
select_for_update
136+
select_related
137+
select_related_onetoone
138+
select_related_regress
57139
timezones
140+
transaction_hooks
141+
transactions
142+
unmanaged_models
143+
update
144+
update_only_fields
145+
validation
146+
view_tests
58147
env:
59148
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
60149
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}

‎django_snowflake/features.py

+62
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
6464
'model_fields.test_charfield.TestCharField.test_assignment_from_choice_enum',
6565
# Violating NOT NULL constraint should raise IntegrityError instead of
6666
# ProgrammingError: https://github.com/snowflakedb/snowflake-connector-python/issues/922
67+
'custom_pk.tests.CustomPKTests.test_required_pk',
6768
'model_fields.test_booleanfield.BooleanFieldTests.test_null_default',
69+
'fixtures.tests.FixtureLoadingTests.test_loaddata_error_message',
70+
'generic_relations.tests.GenericRelationsTests.test_unsaved_instance_on_generic_foreign_key',
6871
'schema.tests.SchemaTests.test_alter_numeric_field_keep_null_status',
6972
'schema.tests.SchemaTests.test_rename_keep_null_status',
7073
# Invalid argument types for function '+': (INTERVAL, TIMESTAMP_NTZ(9))
@@ -115,9 +118,17 @@ class DatabaseFeatures(BaseDatabaseFeatures):
115118
},
116119
'Snowflake does not enforce FOREIGN KEY constraints.': {
117120
'backends.tests.FkConstraintsTests',
121+
'fixtures_regress.tests.TestFixtures.test_loaddata_raises_error_when_fixture_has_invalid_foreign_key',
118122
'model_fields.test_uuid.TestAsPrimaryKeyTransactionTests.test_unsaved_fk',
123+
'transactions.tests.NonAutocommitTests.test_orm_query_after_error_and_rollback',
119124
},
120125
'Snowflake does not enforce UNIQUE constraints.': {
126+
'auth_tests.test_basic.BasicTestCase.test_unicode_username',
127+
'auth_tests.test_migrations.ProxyModelWithSameAppLabelTests.test_migrate_with_existing_target_permission',
128+
'constraints.tests.UniqueConstraintTests.test_database_constraint',
129+
'contenttypes_tests.test_operations.ContentTypeOperationsTests.test_content_type_rename_conflict',
130+
'contenttypes_tests.test_operations.ContentTypeOperationsTests.test_existing_content_type_rename',
131+
'custom_pk.tests.CustomPKTests.test_unique_pk',
121132
'model_fields.test_filefield.FileFieldTests.test_unique_when_same_filename',
122133
'one_to_one.tests.OneToOneTests.test_multiple_o2o',
123134
},
@@ -145,6 +156,16 @@ class DatabaseFeatures(BaseDatabaseFeatures):
145156
'model_fields.test_integerfield.PositiveIntegerFieldTests.test_negative_values',
146157
},
147158
'Snowflake: Unsupported subquery type cannot be evaluated.': {
159+
'admin_filters.tests.ListFiltersTests.test_emptylistfieldfilter_genericrelation',
160+
'admin_filters.tests.ListFiltersTests.test_emptylistfieldfilter_reverse_relationships',
161+
'admin_filters.tests.ListFiltersTests.test_listfilter_genericrelation',
162+
'admin_filters.tests.ListFiltersTests.test_relatedfieldlistfilter_manytomany',
163+
'admin_filters.tests.ListFiltersTests.test_relatedfieldlistfilter_reverse_relationships',
164+
'admin_views.tests.AdminSearchTest.test_exact_matches',
165+
'admin_views.tests.AdminSearchTest.test_no_total_count',
166+
'admin_views.tests.AdminSearchTest.test_search_on_sibling_models',
167+
'admin_views.tests.AdminViewBasicTest.test_relation_spanning_filters',
168+
'admin_views.tests.LimitChoicesToInAdminTest.test_limit_choices_to_as_callable',
148169
'aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_multiple_subquery_annotation', # noqa
149170
'aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_subquery_annotation',
150171
'aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation',
@@ -154,6 +175,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
154175
'annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_aggregate_values_chaining',
155176
'annotations.tests.NonAggregateAnnotationTestCase.test_annotation_filter_with_subquery',
156177
'annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_outerref_transform',
178+
'auth_tests.test_models.UserWithPermTestCase.test_basic',
179+
'auth_tests.test_models.UserWithPermTestCase.test_nonexistent_permission',
157180
'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_subquery_with_parameters',
158181
'expressions_window.tests.WindowFunctionTests.test_subquery_row_range_rank',
159182
'lookup.tests.LookupTests.test_nested_outerref_lhs',
@@ -176,6 +199,12 @@ class DatabaseFeatures(BaseDatabaseFeatures):
176199
'expressions.tests.BasicExpressionsTests.test_subquery_in_filter',
177200
'expressions.tests.FTimeDeltaTests.test_date_subquery_subtraction',
178201
'expressions.tests.FTimeDeltaTests.test_datetime_subquery_subtraction',
202+
'filtered_relation.tests.FilteredRelationTests.test_with_exclude',
203+
'generic_relations.tests.GenericRelationsTests.test_queries_content_type_restriction',
204+
'generic_relations_regress.tests.GenericRelationTests.test_ticket_20378',
205+
'generic_relations_regress.tests.GenericRelationTests.test_ticket_20564',
206+
'generic_relations_regress.tests.GenericRelationTests.test_ticket_20564_nullable_fk',
207+
'many_to_many.tests.ManyToManyTests.test_selects',
179208
'queries.test_qs_combinators.QuerySetSetOperationTests.test_union_with_values_list_on_annotated_and_unannotated', # noqa
180209
'queries.tests.ExcludeTest17600.test_exclude_plain',
181210
'queries.tests.ExcludeTest17600.test_exclude_plain_distinct',
@@ -234,7 +263,9 @@ class DatabaseFeatures(BaseDatabaseFeatures):
234263
'lookup.tests.LookupTests.test_values_list',
235264
'expressions.tests.BasicExpressionsTests.test_filtering_on_rawsql_that_is_boolean',
236265
'expressions.tests.BasicExpressionsTests.test_order_by_multiline_sql',
266+
'many_to_one.tests.ManyToOneTests.test_selects',
237267
'model_fields.test_booleanfield.BooleanFieldTests.test_return_type',
268+
'prefetch_related.tests.RawQuerySetTests',
238269
'queries.test_qs_combinators.QuerySetSetOperationTests.test_union_multiple_models_with_values_list_and_order_by_extra_select', # noqa
239270
'queries.tests.EscapingTests.test_ticket_7302',
240271
'queries.tests.Queries5Tests.test_ordering',
@@ -250,12 +281,30 @@ class DatabaseFeatures(BaseDatabaseFeatures):
250281
'queries.tests.Queries1Tests.test_order_by_rawsql',
251282
'queries.tests.Queries1Tests.test_ticket7098',
252283
'queries.tests.Queries1Tests.test_tickets_7087_12242',
284+
'select_related.tests.SelectRelatedTests.test_select_related_with_extra',
253285
},
254286
"Snowflake prohibits string truncation when using Cast.": {
255287
'db_functions.comparison.test_cast.CastTests.test_cast_to_char_field_with_max_length',
256288
},
257289
'Snowflake does not support nested transactions.': {
290+
'admin_inlines.tests.TestReadOnlyChangeViewInlinePermissions.test_add_url_not_allowed',
291+
'admin_views.tests.AdminViewBasicTest.test_disallowed_to_field',
292+
'admin_views.tests.AdminViewPermissionsTest.test_add_view',
293+
'admin_views.tests.AdminViewPermissionsTest.test_change_view',
294+
'admin_views.tests.AdminViewPermissionsTest.test_change_view_save_as_new',
295+
'admin_views.tests.AdminViewPermissionsTest.test_delete_view',
296+
'auth_tests.test_views.ChangelistTests.test_view_user_password_is_readonly',
297+
'fixtures.tests.FixtureLoadingTests.test_loaddata_app_option',
298+
'fixtures.tests.FixtureLoadingTests.test_unmatched_identifier_loading',
299+
'many_to_one.tests.ManyToOneTests.test_fk_assignment_and_related_object_cache',
300+
'many_to_many.tests.ManyToManyTests.test_add',
258301
'model_fields.test_floatfield.TestFloatField.test_float_validates_object',
302+
'multiple_database.tests.QueryTestCase.test_generic_key_cross_database_protection',
303+
'multiple_database.tests.QueryTestCase.test_m2m_cross_database_protection',
304+
'transaction_hooks.tests.TestConnectionOnCommit.test_discards_hooks_from_rolled_back_savepoint',
305+
'transaction_hooks.tests.TestConnectionOnCommit.test_inner_savepoint_rolled_back_with_outer',
306+
'transaction_hooks.tests.TestConnectionOnCommit.test_inner_savepoint_does_not_affect_outer',
307+
'transactions.tests.DisableDurabiltityCheckTests',
259308
},
260309
'Unused DatabaseIntrospection.get_key_columns() not implemented.': {
261310
'introspection.tests.IntrospectionTests.test_get_key_columns',
@@ -299,6 +348,19 @@ class DatabaseFeatures(BaseDatabaseFeatures):
299348
'schema.tests.SchemaTests.test_alter_field_db_collation',
300349
'schema.tests.SchemaTests.test_ci_cs_db_collation',
301350
},
351+
# https://github.com/cedar-team/django-snowflake/issues/24
352+
'Database caching is not supported.': {
353+
'cache.tests.CreateCacheTableForDBCacheTests',
354+
'cache.tests.DBCacheTests',
355+
'cache.tests.DBCacheWithTimeZoneTests',
356+
},
357+
'assertNumQueries is sometimes off because of the extra queries this '
358+
'backend uses to fetch an object\'s ID.': {
359+
'contenttypes_tests.test_models.ContentTypesTests.test_get_for_models_creation',
360+
},
361+
'It can be problematic if a model instance is manually assigned a pk value.': {
362+
'contenttypes_tests.test_views.ContentTypesViewsSiteRelTests.test_shortcut_view_with_null_site_fk',
363+
},
302364
}
303365

304366
@cached_property

0 commit comments

Comments
 (0)
Please sign in to comment.