From 1286a7299b410bde2bc1ee8df6e12491af812610 Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Tue, 19 Nov 2024 14:45:54 -0600 Subject: [PATCH] Only run tests when the db can update conflicts. --- simple_history/tests/tests/test_utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/simple_history/tests/tests/test_utils.py b/simple_history/tests/tests/test_utils.py index eb88abc4..84fd276f 100644 --- a/simple_history/tests/tests/test_utils.py +++ b/simple_history/tests/tests/test_utils.py @@ -6,7 +6,13 @@ import django from django.contrib.auth import get_user_model from django.db import IntegrityError, transaction -from django.test import TestCase, TransactionTestCase, override_settings, tag +from django.test import ( + TestCase, + TransactionTestCase, + override_settings, + skipUnlessDBFeature, + tag, +) from django.utils import timezone from simple_history.exceptions import AlternativeManagerError, NotHistoricalModelError @@ -258,6 +264,7 @@ def test_bulk_create_history_with_duplicates_ignore_conflicts(self): self.assertEqual(PollWithUniqueQuestion.objects.count(), 2) self.assertEqual(PollWithUniqueQuestion.history.count(), 2) + @skipUnlessDBFeature("supports_update_conflicts") def test_bulk_create_history_with_duplicates_update_conflicts_create_only_field( self, ):