From adaf51ea590978cf9c431ad9fc36225a7e576d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Freitag?= Date: Wed, 11 Sep 2024 15:54:17 +0200 Subject: [PATCH] Fix JobApplicationState import paths in tests The enum comes from the enums module, not models. --- tests/job_applications/factories.py | 4 ++-- tests/job_applications/test_admin.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/job_applications/factories.py b/tests/job_applications/factories.py index 73e790b6f0..ebfcd79873 100644 --- a/tests/job_applications/factories.py +++ b/tests/job_applications/factories.py @@ -44,7 +44,7 @@ class Params: job_seeker=factory.SubFactory(JobSeekerFactory, with_mocked_address=True) ) with_approval = factory.Trait( - state=models.JobApplicationState.ACCEPTED, + state=JobApplicationState.ACCEPTED, approval=factory.SubFactory( ApprovalFactory, user=factory.SelfAttribute("..job_seeker"), @@ -216,7 +216,7 @@ class JobApplicationSentByPrescriberPoleEmploiFactory(JobApplicationSentByPrescr class JobApplicationWithoutApprovalFactory(JobApplicationSentByPrescriberFactory): """Generates a JobApplication() object without an Approval() object.""" - state = models.JobApplicationState.ACCEPTED + state = JobApplicationState.ACCEPTED hiring_without_approval = True diff --git a/tests/job_applications/test_admin.py b/tests/job_applications/test_admin.py index abf054516e..564f370561 100644 --- a/tests/job_applications/test_admin.py +++ b/tests/job_applications/test_admin.py @@ -20,7 +20,7 @@ def test_create_employee_record(admin_client): job_application = factories.JobApplicationFactory( - state=models.JobApplicationState.ACCEPTED, + state=JobApplicationState.ACCEPTED, with_approval=True, )