From 68751515146721466fd73b25ec9239af1ac27aca Mon Sep 17 00:00:00 2001 From: mShan0 Date: Fri, 10 Mar 2023 11:12:56 -0800 Subject: [PATCH 1/4] disable allows_group_by_select_index --- mssql/features.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mssql/features.py b/mssql/features.py index a60a9283..faaa0bbb 100644 --- a/mssql/features.py +++ b/mssql/features.py @@ -6,6 +6,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): + allows_group_by_select_index = False allow_sliced_subqueries_with_in = False can_introspect_autofield = True can_introspect_json_field = False @@ -71,4 +72,4 @@ def introspected_field_types(self): return { **super().introspected_field_types, "DurationField": "BigIntegerField", - } \ No newline at end of file + } From 9ac7c2f0c9bee278016d3973d3dc50b072397100 Mon Sep 17 00:00:00 2001 From: mShan0 Date: Fri, 10 Mar 2023 11:33:37 -0800 Subject: [PATCH 2/4] unskip old tests --- testapp/settings.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/testapp/settings.py b/testapp/settings.py index 311e9175..ee5ee11d 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -99,11 +99,8 @@ 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', @@ -165,17 +162,13 @@ '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', 'expressions.tests.FTimeDeltaTests.test_date_subquery_subtraction', 'expressions.tests.FTimeDeltaTests.test_datetime_subquery_subtraction', 'expressions.tests.FTimeDeltaTests.test_time_subquery_subtraction', 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_type_change', 'schema.tests.SchemaTests.test_alter_smallint_pk_to_smallautofield_pk', - 'annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation', - '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', @@ -271,7 +264,6 @@ # Django 4.1 'aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_on_exists', 'aggregation.tests.AggregateTestCase.test_aggregation_exists_multivalued_outeref', - 'annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation_with_aggregation', 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_lookup_name_sql_injection', 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_lookup_name_sql_injection', 'schema.tests.SchemaTests.test_autofield_to_o2o', From 9816cdfe212c853a922c506dc938b05f3b2ac1b4 Mon Sep 17 00:00:00 2001 From: mShan0 Date: Mon, 13 Mar 2023 11:07:55 -0700 Subject: [PATCH 3/4] unskip some tests --- testapp/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testapp/settings.py b/testapp/settings.py index ee5ee11d..d87fc904 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -101,6 +101,7 @@ EXCLUDED_TESTS = [ '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', @@ -162,6 +163,8 @@ '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', 'expressions.tests.FTimeDeltaTests.test_date_subquery_subtraction', 'expressions.tests.FTimeDeltaTests.test_datetime_subquery_subtraction', From 8e5c9cdac6918df92638d4f1bcfec62cd5cfb090 Mon Sep 17 00:00:00 2001 From: mShan0 Date: Mon, 13 Mar 2023 12:16:39 -0700 Subject: [PATCH 4/4] skip more tests --- testapp/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/testapp/settings.py b/testapp/settings.py index d87fc904..3fb637bb 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -267,6 +267,7 @@ # Django 4.1 'aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_on_exists', 'aggregation.tests.AggregateTestCase.test_aggregation_exists_multivalued_outeref', + 'annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation_with_aggregation', 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_lookup_name_sql_injection', 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_lookup_name_sql_injection', 'schema.tests.SchemaTests.test_autofield_to_o2o',