diff --git a/lemarche/siaes/factories.py b/lemarche/siaes/factories.py index 3e750f316..abf98109d 100644 --- a/lemarche/siaes/factories.py +++ b/lemarche/siaes/factories.py @@ -44,8 +44,8 @@ class Meta: address = factory.Faker("street_address", locale="fr_FR") city = factory.Faker("city", locale="fr_FR") post_code = factory.Faker("postalcode") - department = factory.fuzzy.FuzzyChoice([key for (key, value) in Siae.DEPARTMENT_CHOICES]) - region = factory.fuzzy.FuzzyChoice([key for (key, value) in Siae.REGION_CHOICES]) + department = "35" + region = "Bretagne" contact_email = factory.Sequence("siae_contact_email{0}@beta.gouv.fr".format) contact_first_name = factory.Faker("name", locale="fr_FR") contact_last_name = factory.Faker("name", locale="fr_FR") diff --git a/lemarche/siaes/tests/test_commands.py b/lemarche/siaes/tests/test_commands.py index b78cc1541..49807a834 100644 --- a/lemarche/siaes/tests/test_commands.py +++ b/lemarche/siaes/tests/test_commands.py @@ -1,8 +1,8 @@ -import factory import logging import os from unittest.mock import patch +import factory from django.core.management import call_command from django.db.models import signals from django.test import TransactionTestCase @@ -328,6 +328,7 @@ def test_create_activities_failed_with_department(self): kind=siae_constants.KIND_EA, presta_type=[siae_constants.PRESTA_DISP], geo_range=siae_constants.GEO_RANGE_DEPARTMENT, + department="35", ) siae.sectors.set([self.sector2, self.sector3]) @@ -346,6 +347,7 @@ def test_create_activities_failed_with_region(self): kind=siae_constants.KIND_EA, presta_type=[siae_constants.PRESTA_DISP], geo_range=siae_constants.GEO_RANGE_REGION, + region="Bretagne", ) siae.sectors.set([self.sector2, self.sector3])