From 417e9d090af4bff9989ba0410fcc53e7d0b5a280 Mon Sep 17 00:00:00 2001 From: Ewen Corre Date: Fri, 10 Jan 2025 11:05:07 +0100 Subject: [PATCH 1/4] apply: correct a `start` URL in a test In a Hire process, the start URL is `apply:start_hire` --- tests/www/apply/test_submit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/www/apply/test_submit.py b/tests/www/apply/test_submit.py index 4e66fbe324..9ee2ffbfcd 100644 --- a/tests/www/apply/test_submit.py +++ b/tests/www/apply/test_submit.py @@ -4728,7 +4728,7 @@ def setup_method(self): def get_check_nir_url(self, client): # Init session - start_url = reverse("apply:start", kwargs={"company_pk": self.company.pk}) + start_url = reverse("apply:start_hire", kwargs={"company_pk": self.company.pk}) client.get(start_url) [job_seeker_session_name] = [k for k in client.session.keys() if k not in KNOWN_SESSION_KEYS] return reverse("job_seekers_views:check_nir_for_hire", kwargs={"session_uuid": job_seeker_session_name}) From 32bb89cf4f580a3b9cecf256cda9efb7d3d6386b Mon Sep 17 00:00:00 2001 From: Ewen Corre Date: Fri, 10 Jan 2025 13:20:25 +0100 Subject: [PATCH 2/4] apply: format imports --- itou/www/apply/views/submit_views.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/itou/www/apply/views/submit_views.py b/itou/www/apply/views/submit_views.py index 6ff1f98b99..16b5b2d53a 100644 --- a/itou/www/apply/views/submit_views.py +++ b/itou/www/apply/views/submit_views.py @@ -23,16 +23,11 @@ from itou.users.models import User from itou.utils.session import SessionNamespace from itou.utils.urls import add_url_params -from itou.www.apply.forms import ( - ApplicationJobsForm, - SubmitJobApplicationForm, -) +from itou.www.apply.forms import ApplicationJobsForm, SubmitJobApplicationForm from itou.www.apply.views import common as common_views, constants as apply_view_constants from itou.www.eligibility_views.forms import AdministrativeCriteriaForm from itou.www.geiq_eligibility_views.forms import GEIQAdministrativeCriteriaForm -from itou.www.job_seekers_views.forms import ( - CreateOrUpdateJobSeekerStep2Form, -) +from itou.www.job_seekers_views.forms import CreateOrUpdateJobSeekerStep2Form logger = logging.getLogger(__name__) From 622c95e40db891ce0de6af97019492c36b1a7114 Mon Sep 17 00:00:00 2001 From: Ewen Corre Date: Mon, 13 Jan 2025 15:52:24 +0100 Subject: [PATCH 3/4] job_seekers_views: required parameters for Update views In Update views, we don't need the company, but for the sake of clarity we now need a `from_url` so that this value can be set in one less place. --- .../apply/submit/application/base.html | 2 +- .../check_job_seeker_info_for_hire.html | 3 +- itou/www/job_seekers_views/views.py | 10 +- .../www/apply/__snapshots__/test_submit.ambr | 1812 +---------------- tests/www/apply/test_submit.py | 12 +- .../test_create_or_update.py | 205 +- 6 files changed, 161 insertions(+), 1883 deletions(-) diff --git a/itou/templates/apply/submit/application/base.html b/itou/templates/apply/submit/application/base.html index 3812b69394..c944733f48 100644 --- a/itou/templates/apply/submit/application/base.html +++ b/itou/templates/apply/submit/application/base.html @@ -37,7 +37,7 @@

{% include 'apply/includes/_submit_title.ht

Dernière actualisation du profil : {{ job_seeker.last_checked_at|date }} à {{ job_seeker.last_checked_at|time }} {% if can_view_personal_information and not request.user.is_job_seeker %} - Vérifier le profil + Vérifier le profil {% endif %} {% if new_check_needed %}{% endif %}

diff --git a/itou/templates/job_seekers_views/check_job_seeker_info_for_hire.html b/itou/templates/job_seekers_views/check_job_seeker_info_for_hire.html index fb6f712a97..88c4fa1b14 100644 --- a/itou/templates/job_seekers_views/check_job_seeker_info_for_hire.html +++ b/itou/templates/job_seekers_views/check_job_seeker_info_for_hire.html @@ -14,8 +14,7 @@

Informations personnelles de {{ job_seeker.

Informations personnelles - Mettre à jour + Mettre à jour

{% include "apply/includes/profile_infos.html" %} diff --git a/itou/www/job_seekers_views/views.py b/itou/www/job_seekers_views/views.py index 783bd1440e..7313119d14 100644 --- a/itou/www/job_seekers_views/views.py +++ b/itou/www/job_seekers_views/views.py @@ -775,12 +775,9 @@ def setup(self, request, *args, **kwargs): except ValidationError: raise Http404("Aucun candidat n'a été trouvé") - try: - company = get_object_or_404(Company.objects.with_has_active_members(), pk=request.GET.get("company")) - except ValueError: - raise Http404("Aucune entreprise n'a été trouvée") - - from_url = get_safe_url(request, "from_url", fallback_url=reverse("dashboard:index")) + from_url = get_safe_url(request, "from_url") + if not from_url: + raise Http404 if request.user.is_job_seeker or not request.user.can_view_personal_information(job_seeker): raise PermissionDenied("Votre utilisateur n'est pas autorisé à vérifier les informations de ce candidat") @@ -790,7 +787,6 @@ def setup(self, request, *args, **kwargs): data={ "config": {"from_url": from_url, "session_kind": "job-seeker-update"}, "job_seeker_pk": job_seeker.pk, - "apply": {"company_pk": company.pk}, }, ) diff --git a/tests/www/apply/__snapshots__/test_submit.ambr b/tests/www/apply/__snapshots__/test_submit.ambr index a93341f06b..90f42c6f15 100644 --- a/tests/www/apply/__snapshots__/test_submit.ambr +++ b/tests/www/apply/__snapshots__/test_submit.ambr @@ -941,7 +941,7 @@ # --- # name: TestUpdateJobSeeker.test_as_authorized_prescriber_with_proxied_job_seeker[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -1100,58 +1100,6 @@ LIMIT 21 ''', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'User.is_prescriber_with_authorized_org[users/models.py]', @@ -1208,7 +1156,7 @@ # --- # name: TestUpdateJobSeeker.test_as_authorized_prescriber_with_proxied_job_seeker[queries - step 1] dict({ - 'num_queries': 13, + 'num_queries': 12, 'queries': list([ dict({ 'origin': list([ @@ -1338,60 +1286,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -1550,7 +1444,7 @@ # --- # name: TestUpdateJobSeeker.test_as_authorized_prescriber_with_proxied_job_seeker[queries - step 2] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -1680,60 +1574,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -1809,7 +1649,7 @@ # --- # name: TestUpdateJobSeeker.test_as_authorized_prescriber_with_proxied_job_seeker[queries - step 3] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -1939,60 +1779,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', @@ -2634,7 +2420,7 @@ # --- # name: TestUpdateJobSeeker.test_as_company_with_proxied_job_seeker[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -2847,73 +2633,21 @@ }), dict({ 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), - dict({ - 'origin': list([ - 'Atomic.__exit__[/django/db/transaction.py]', - ]), - 'sql': 'RELEASE SAVEPOINT ""', - }), - dict({ - 'origin': list([ - 'Atomic.__enter__[/django/db/transaction.py]', - 'SessionStore.save[/django/contrib/sessions/backends/db.py]', - ]), - 'sql': 'SAVEPOINT ""', - }), - dict({ - 'origin': list([ - 'Session.save[/django/db/models/base.py]', - 'SessionStore.save[/django/contrib/sessions/backends/db.py]', + 'Atomic.__exit__[/django/db/transaction.py]', + ]), + 'sql': 'RELEASE SAVEPOINT ""', + }), + dict({ + 'origin': list([ + 'Atomic.__enter__[/django/db/transaction.py]', + 'SessionStore.save[/django/contrib/sessions/backends/db.py]', + ]), + 'sql': 'SAVEPOINT ""', + }), + dict({ + 'origin': list([ + 'Session.save[/django/db/models/base.py]', + 'SessionStore.save[/django/contrib/sessions/backends/db.py]', ]), 'sql': ''' UPDATE "django_session" @@ -2934,7 +2668,7 @@ # --- # name: TestUpdateJobSeeker.test_as_company_with_proxied_job_seeker[queries - step 1] dict({ - 'num_queries': 14, + 'num_queries': 13, 'queries': list([ dict({ 'origin': list([ @@ -3116,60 +2850,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -3336,7 +3016,7 @@ # --- # name: TestUpdateJobSeeker.test_as_company_with_proxied_job_seeker[queries - step 2] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -3518,60 +3198,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -3655,7 +3281,7 @@ # --- # name: TestUpdateJobSeeker.test_as_company_with_proxied_job_seeker[queries - step 3] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -3837,60 +3463,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', @@ -4660,7 +4232,7 @@ # --- # name: TestUpdateJobSeeker.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -4821,61 +4393,9 @@ }), dict({ 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), - dict({ - 'origin': list([ - 'User.is_prescriber_with_authorized_org[users/models.py]', - 'User.can_edit_personal_information[users/models.py]', - 'User.can_view_personal_information[users/models.py]', + 'User.is_prescriber_with_authorized_org[users/models.py]', + 'User.can_edit_personal_information[users/models.py]', + 'User.can_view_personal_information[users/models.py]', 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', ]), 'sql': ''' @@ -4927,7 +4447,7 @@ # --- # name: TestUpdateJobSeeker.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - step 1] dict({ - 'num_queries': 13, + 'num_queries': 12, 'queries': list([ dict({ 'origin': list([ @@ -5057,60 +4577,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -5269,7 +4735,7 @@ # --- # name: TestUpdateJobSeeker.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - step 2] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -5399,60 +4865,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -5528,7 +4940,7 @@ # --- # name: TestUpdateJobSeeker.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - step 3] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -5658,60 +5070,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', @@ -6353,7 +5711,7 @@ # --- # name: TestUpdateJobSeeker.test_with_job_seeker_without_nir[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -6564,58 +5922,6 @@ LIMIT 21 ''', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'Atomic.__exit__[/django/db/transaction.py]', @@ -6653,7 +5959,7 @@ # --- # name: TestUpdateJobSeeker.test_with_job_seeker_without_nir[queries - step 1] dict({ - 'num_queries': 14, + 'num_queries': 13, 'queries': list([ dict({ 'origin': list([ @@ -6835,60 +6141,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -7055,7 +6307,7 @@ # --- # name: TestUpdateJobSeeker.test_with_job_seeker_without_nir[queries - step 2] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -7237,60 +6489,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -7374,7 +6572,7 @@ # --- # name: TestUpdateJobSeeker.test_with_job_seeker_without_nir[queries - step 3] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -7556,60 +6754,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', @@ -8379,7 +7523,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_authorized_prescriber_with_proxied_job_seeker[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -8538,58 +7682,6 @@ LIMIT 21 ''', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'User.is_prescriber_with_authorized_org[users/models.py]', @@ -8646,7 +7738,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_authorized_prescriber_with_proxied_job_seeker[queries - step 1] dict({ - 'num_queries': 13, + 'num_queries': 12, 'queries': list([ dict({ 'origin': list([ @@ -8776,60 +7868,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -8988,7 +8026,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_authorized_prescriber_with_proxied_job_seeker[queries - step 2] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -9118,60 +8156,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -9247,7 +8231,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_authorized_prescriber_with_proxied_job_seeker[queries - step 3] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -9377,60 +8361,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', @@ -9543,7 +8473,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_company_with_proxied_job_seeker[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -9754,58 +8684,6 @@ LIMIT 21 ''', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'Atomic.__exit__[/django/db/transaction.py]', @@ -9843,7 +8721,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_company_with_proxied_job_seeker[queries - step 1] dict({ - 'num_queries': 14, + 'num_queries': 13, 'queries': list([ dict({ 'origin': list([ @@ -10025,60 +8903,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -10245,7 +9069,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_company_with_proxied_job_seeker[queries - step 2] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -10427,60 +9251,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -10564,7 +9334,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_company_with_proxied_job_seeker[queries - step 3] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -10746,60 +9516,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', @@ -11609,7 +10325,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -11768,58 +10484,6 @@ LIMIT 21 ''', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'User.is_prescriber_with_authorized_org[users/models.py]', @@ -11876,7 +10540,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - step 1] dict({ - 'num_queries': 13, + 'num_queries': 12, 'queries': list([ dict({ 'origin': list([ @@ -12006,60 +10670,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -12218,7 +10828,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - step 2] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -12348,60 +10958,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -12477,7 +11033,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_as_unauthorized_prescriber_that_created_proxied_job_seeker[queries - step 3] dict({ - 'num_queries': 9, + 'num_queries': 8, 'queries': list([ dict({ 'origin': list([ @@ -12607,60 +11163,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', @@ -12773,7 +11275,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_with_job_seeker_without_nir[queries - start] dict({ - 'num_queries': 11, + 'num_queries': 10, 'queries': list([ dict({ 'origin': list([ @@ -12984,58 +11486,6 @@ LIMIT 21 ''', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStartView.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'Atomic.__exit__[/django/db/transaction.py]', @@ -13073,7 +11523,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_with_job_seeker_without_nir[queries - step 1] dict({ - 'num_queries': 14, + 'num_queries': 13, 'queries': list([ dict({ 'origin': list([ @@ -13255,60 +11705,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep1View.setup[www/job_seekers_views/views.py]', @@ -13475,7 +11871,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_with_job_seeker_without_nir[queries - step 2] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -13657,60 +12053,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep2View.setup[www/job_seekers_views/views.py]', @@ -13794,7 +12136,7 @@ # --- # name: TestUpdateJobSeekerForHire.test_with_job_seeker_without_nir[queries - step 3] dict({ - 'num_queries': 10, + 'num_queries': 9, 'queries': list([ dict({ 'origin': list([ @@ -13976,60 +12318,6 @@ ]), 'sql': 'SAVEPOINT ""', }), - dict({ - 'origin': list([ - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', - ]), - 'sql': ''' - SELECT "companies_company"."id", - "companies_company"."address_line_1", - "companies_company"."address_line_2", - "companies_company"."post_code", - "companies_company"."city", - "companies_company"."department", - "companies_company"."coords", - "companies_company"."geocoding_score", - "companies_company"."geocoding_updated_at", - "companies_company"."ban_api_resolved_address", - "companies_company"."insee_city_id", - "companies_company"."name", - "companies_company"."created_at", - "companies_company"."updated_at", - "companies_company"."uid", - "companies_company"."active_members_email_reminder_last_sent_at", - "companies_company"."automatic_geocoding_update", - "companies_company"."siret", - "companies_company"."naf", - "companies_company"."kind", - "companies_company"."brand", - "companies_company"."phone", - "companies_company"."email", - "companies_company"."auth_email", - "companies_company"."website", - "companies_company"."description", - "companies_company"."provided_support", - "companies_company"."source", - "companies_company"."created_by_id", - "companies_company"."block_job_applications", - "companies_company"."job_applications_blocked_at", - "companies_company"."convention_id", - "companies_company"."job_app_score", - "companies_company"."is_searchable", - "companies_company"."rdv_solidarites_id", - EXISTS - (SELECT %s AS "a" - FROM "companies_companymembership" U0 - WHERE (U0."company_id" = ("companies_company"."id") - AND U0."is_active") - LIMIT 1) AS "has_active_members" - FROM "companies_company" - WHERE (NOT ("companies_company"."siret" = %s) - AND "companies_company"."id" = %s) - LIMIT 21 - ''', - }), dict({ 'origin': list([ 'UpdateJobSeekerStep3View.setup[www/job_seekers_views/views.py]', diff --git a/tests/www/apply/test_submit.py b/tests/www/apply/test_submit.py index 9ee2ffbfcd..8b41130139 100644 --- a/tests/www/apply/test_submit.py +++ b/tests/www/apply/test_submit.py @@ -263,7 +263,7 @@ def test_404_when_trying_to_update_a_prescriber(self, client): client.force_login(company.members.first()) params = { "job_seeker": prescriber.public_id, - "company": company.pk, + "from_url": reverse("dashboard:index"), } url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) response = client.get(url) @@ -3415,7 +3415,6 @@ def _check_last_checked_at(self, client, user, sees_warning, sees_verify_link): params = { "job_seeker": self.job_seeker.public_id, - "company": self.company.pk, "from_url": url, } update_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) @@ -3468,7 +3467,6 @@ def setup_method(self, settings, mocker): kwargs={"company_pk": self.company.pk, "job_seeker_public_id": self.job_seeker.public_id}, ) self.config = { - "apply": {"company_pk": self.company.pk}, "config": {"from_url": from_url, "session_kind": "job-seeker-update"}, "job_seeker_pk": self.job_seeker.pk, } @@ -3486,7 +3484,6 @@ def setup_method(self, settings, mocker): params = { "job_seeker": self.job_seeker.public_id, - "company": self.company.pk, "from_url": from_url, } self.start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) @@ -4094,7 +4091,10 @@ def test_job_seeker_with_profile_has_check_boxes_ticked_in_step3(self, client): # START to setup jobseeker session params = { "job_seeker": job_seeker.public_id, - "company": company.pk, + "from_url": reverse( + "apply:application_jobs", + kwargs={"company_pk": company.pk, "job_seeker_public_id": job_seeker.public_id}, + ), } url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) response = client.get(url) @@ -4885,7 +4885,6 @@ def test_company(self, client): assertContains(response, "Éligibilité IAE à valider") params = { "job_seeker": job_seeker.public_id, - "company": company.pk, "from_url": url_check_infos, } url_update = f""" @@ -4929,7 +4928,6 @@ def test_geiq(self, client): assertTemplateNotUsed(response, "approvals/includes/box.html") params = { "job_seeker": job_seeker.public_id, - "company": company.pk, "from_url": url_check_infos, } url_update = f""" diff --git a/tests/www/job_seekers_views/test_create_or_update.py b/tests/www/job_seekers_views/test_create_or_update.py index 65ba8be4bb..f3a2e24e7b 100644 --- a/tests/www/job_seekers_views/test_create_or_update.py +++ b/tests/www/job_seekers_views/test_create_or_update.py @@ -192,131 +192,119 @@ def test_birth_country_france_and_no_birthplace(self, client): ) -class TestUpdateJobSeeker: - def test_update_with_wrong_tunnel_in_session(self, client): - job_seeker = JobSeekerFactory() +class TestUpdateForJobSeekerStart: + def test_start_update_job_seeker_forbidden(self, client): + job_seeker = JobSeekerFactory(jobseeker_profile__birthdate=None, jobseeker_profile__nir="") company = CompanyFactory(with_membership=True) - prescriber = PrescriberOrganizationWithMembershipFactory(authorized=True).members.first() - client.force_login(prescriber) - - # Create a session with a wrong tunnel key - job_seeker_session = SessionNamespace.create_uuid_namespace( - client.session, - data={ - "config": {"from_url": reverse("dashboard:index"), "session_kind": "job-seeker-get-or-create-sender"}, - "job_seeker_pk": job_seeker.pk, - "apply": {"company_pk": company.pk}, - }, - ) - job_seeker_session.save() - - url = reverse("job_seekers_views:update_job_seeker_step_1", kwargs={"session_uuid": job_seeker_session.name}) - response = client.get(url) + client.force_login(job_seeker) - assert response.status_code == 404 - - -class TestUpdateJobSeekerStart: - def test_update_start_with_valid_parameters(self, client): - job_seeker = JobSeekerFactory() - company = CompanyFactory(with_membership=True) - user = company.members.get() - client.force_login(user) + company_pk = company.pk from_url = reverse( - "apply:application_jobs", kwargs={"company_pk": company.pk, "job_seeker_public_id": job_seeker.public_id} + "apply:application_jobs", + kwargs={"company_pk": company.pk, "job_seeker_public_id": job_seeker.public_id}, ) - params = {"job_seeker": job_seeker.public_id, "company": company.pk, "from_url": from_url} + params = { + "job_seeker": job_seeker.public_id, + "company": company_pk, + "from_url": from_url, + } start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) response = client.get(start_url) - [job_seeker_session_name] = [k for k in client.session.keys() if k not in KNOWN_SESSION_KEYS] - step_1_url = reverse( - "job_seekers_views:update_job_seeker_step_1", - kwargs={"session_uuid": job_seeker_session_name}, - ) + assert response.status_code == 403 - assertRedirects(response, step_1_url) - assert client.session[job_seeker_session_name].get("config").get("from_url") == from_url - response = client.get(step_1_url) - assertContains( - response, - f""" - - - Annuler - - """, - html=True, - ) - def test_update_start_with_invalid_parameters(self, client): +class TestUpdateForSenderStart: + @pytest.mark.parametrize( + "job_seeker_value, from_url_value, expected_status_code", + [ + # Valid parameters + pytest.param("valid", "valid", 302, id="valid_values"), + # Invalid parameters + pytest.param("invalid_uuid", "valid", 404, id="invalid_job_seeker_not_a_uuid"), + pytest.param("invalid", "valid", 404, id="invalid_job_seeker_not_found"), + pytest.param(None, "valid", 404, id="missing_job_seeker"), + pytest.param("valid", None, 404, id="missing_from_url"), + ], + ) + def test_start_update(self, job_seeker_value, from_url_value, expected_status_code, client): job_seeker = JobSeekerFactory() company = CompanyFactory(with_membership=True) user = company.members.get() client.force_login(user) - # Invalid uuid - params = {"job_seeker": "invalid_uuid", "company": company.pk} - start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) - response = client.get(start_url) - assert response.status_code == 404 + match job_seeker_value: + case "valid": + job_seeker_public_id = job_seeker.public_id + case "invalid_uuid": + job_seeker_public_id = "invalid_uuid_value" + case "invalid": + job_seeker_public_id = uuid.uuid4() + case _: + job_seeker_public_id = None + + if from_url_value == "valid": + from_url = reverse( + "apply:application_jobs", + kwargs={"company_pk": company.pk, "job_seeker_public_id": job_seeker.public_id}, + ) + else: + from_url = None - # Valid UUID but no job seeker associated to it params = { - "job_seeker": uuid.uuid4(), - "company": company.pk, + "job_seeker": job_seeker_public_id, + "from_url": from_url, } start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) - response = client.get(start_url) - assert response.status_code == 404 - # No company parameter - params = { - "job_seeker": job_seeker.public_id, - } - start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) response = client.get(start_url) - assert response.status_code == 404 + assert response.status_code == expected_status_code - # Invalid company parameter - params = { - "job_seeker": job_seeker.public_id, - "company": "stringAndNotNumber", - } - start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) - response = client.get(start_url) - assert response.status_code == 404 - - # No from_url parameter - params = { - "job_seeker": job_seeker.public_id, - "company": company.pk, - } - start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) - response = client.get(start_url) + if expected_status_code == 302: + [job_seeker_session_name] = [k for k in client.session.keys() if k not in KNOWN_SESSION_KEYS] + step_1_url = reverse( + "job_seekers_views:update_job_seeker_step_1", + kwargs={"session_uuid": job_seeker_session_name}, + ) + + assertRedirects(response, step_1_url) + assert client.session[job_seeker_session_name].get("config").get("from_url") == from_url + response = client.get(step_1_url) + assertContains( + response, + f""" + + + Annuler + + """, + html=True, + ) + + def test_update_with_wrong_session(self, client): + job_seeker = JobSeekerFactory() + company = CompanyFactory(with_membership=True) + prescriber = PrescriberOrganizationWithMembershipFactory(authorized=True).members.first() + client.force_login(prescriber) - [job_seeker_session_name] = [k for k in client.session.keys() if k not in KNOWN_SESSION_KEYS] - step_1_url = reverse( - "job_seekers_views:update_job_seeker_step_1", - kwargs={"session_uuid": job_seeker_session_name}, - ) - assert client.session[job_seeker_session_name].get("config").get("from_url") == reverse("dashboard:index") - response = client.get(step_1_url) - assertContains( - response, - f""" - - - Annuler - - """, - html=True, + # Create a session with a wrong tunnel key + job_seeker_session = SessionNamespace.create_uuid_namespace( + client.session, + data={ + "config": {"from_url": reverse("dashboard:index"), "session_kind": "job-seeker-get-or-create-sender"}, + "job_seeker_pk": job_seeker.pk, + "apply": {"company_pk": company.pk}, + }, ) + job_seeker_session.save() + + url = reverse("job_seekers_views:update_job_seeker_step_1", kwargs={"session_uuid": job_seeker_session.name}) + response = client.get(url) + + assert response.status_code == 404 class TestUpdateJobSeekerStep1: @@ -332,7 +320,10 @@ def test_create_step_1(self, born_in_france, client): # Init session params = { "job_seeker": job_seeker.public_id, - "company": company.pk, + "from_url": reverse( + "apply:application_jobs", + kwargs={"company_pk": company.pk, "job_seeker_public_id": job_seeker.public_id}, + ), } start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) client.get(start_url) @@ -376,7 +367,10 @@ def test_birth_country_not_france_and_birthplace(self, client): # Init session params = { "job_seeker": job_seeker.public_id, - "company": company.pk, + "from_url": reverse( + "apply:application_jobs", + kwargs={"company_pk": company.pk, "job_seeker_public_id": job_seeker.public_id}, + ), } start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) client.get(start_url) @@ -416,7 +410,10 @@ def test_birth_country_france_and_no_birthplace(self, client): # Init session params = { "job_seeker": job_seeker.public_id, - "company": company.pk, + "from_url": reverse( + "apply:application_jobs", + kwargs={"company_pk": company.pk, "job_seeker_public_id": job_seeker.public_id}, + ), } start_url = add_url_params(reverse("job_seekers_views:update_job_seeker_start"), params) client.get(start_url) From 5266f668cc1ffb9e42f6ed2fdf4ac407c70ae971 Mon Sep 17 00:00:00 2001 From: Ewen Corre Date: Tue, 14 Jan 2025 10:22:38 +0100 Subject: [PATCH 4/4] Add job_seekers_views migration work to technical migrations --- migrations.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/migrations.md b/migrations.md index 44d5f0d37a..d69a55a043 100644 --- a/migrations.md +++ b/migrations.md @@ -33,3 +33,8 @@ Cette migration est problématique quand la modale est liée à un `{% include % car on ne peut pas avoir des `{% include %}` et des `{% block %}`, mais devrait éviter des problèmes de `z-index` lorsque le *markup* de la modale est dans un élément avec `z-index` différent. + +## Extraction du parcours de recherche/création/modification de compte candidat +Historiquement, la création de compte candidat par un prescripteur ou un employeur était rattachée au processus de candidature. +Nous voulons à présent déconnecter les deux processus. +Trois applications sont impactées : `job_seekers_views`, `apply` et `gps`.