Skip to content

Commit

Permalink
fix test of duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Jan 10, 2025
1 parent c33b325 commit b0e1a8f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lemarche/tenders/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.apps import apps
from django.contrib.gis.geos import Point
from django.forms.models import model_to_dict
from django.test import RequestFactory, TestCase
from django.test import RequestFactory, TestCase, TransactionTestCase
from django.utils import timezone

from lemarche.networks.factories import NetworkFactory
Expand Down Expand Up @@ -1081,9 +1081,9 @@ def test_edit_form_validate_submission_to_commercial_partners(self):
self.assertTrue(tender_response.send_to_commercial_partners_only)


class TenderUtilsTest(TestCase):
class TenderUtilsTest(TransactionTestCase):
@classmethod
def setUpTestData(cls):
def setUpClass(cls):
cls.user_siae = UserFactory(kind=User.KIND_SIAE)
cls.user_buyer = UserFactory(kind=User.KIND_BUYER)
cls.siae_with_tender_1 = SiaeFactory(users=[cls.user_siae])
Expand All @@ -1105,6 +1105,7 @@ def test_duplicate(self):
self.assertNotEqual(self.tender_with_siae.status, new_tender.status)
self.assertEqual(self.tender_with_siae.sectors.count(), new_tender.sectors.count())
self.assertNotEqual(self.tender_with_siae.siaes.count(), new_tender.siaes.count())
self.assertNotEqual(self.tender_with_siae.slug, new_tender.slug)


class TenderUtilsFindAmountRangesTests(TestCase):
Expand Down

0 comments on commit b0e1a8f

Please sign in to comment.