Skip to content

Commit

Permalink
Only run tests when the db can update conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schilling committed Nov 19, 2024
1 parent ed10665 commit 2594da5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion simple_history/tests/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
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,
)
from django.utils import timezone

from simple_history.exceptions import AlternativeManagerError, NotHistoricalModelError
Expand Down Expand Up @@ -258,6 +263,9 @@ 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", "supports_update_conflicts_with_target"
)
def test_bulk_create_history_with_duplicates_update_conflicts_create_only_field(
self,
):
Expand Down

0 comments on commit 2594da5

Please sign in to comment.