From 3d10512ceedfec55f794409cce1ef82c40b6190c Mon Sep 17 00:00:00 2001 From: Tore Brede <Tore.Brede@uib.no> Date: Tue, 19 Oct 2021 12:44:27 +0200 Subject: [PATCH] GREG-85: Fixing formatting --- gregui/api/serializers/guest.py | 4 +++- gregui/tests/api/test_invitation.py | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gregui/api/serializers/guest.py b/gregui/api/serializers/guest.py index d38b30a8..80f12230 100644 --- a/gregui/api/serializers/guest.py +++ b/gregui/api/serializers/guest.py @@ -22,7 +22,9 @@ class GuestRegisterSerializer(serializers.ModelSerializer): first_name = serializers.CharField(required=False) last_name = serializers.CharField(required=False) email = serializers.CharField(required=True) - mobile_phone = serializers.CharField(required=True, validators=[_validatePhoneNumber]) + mobile_phone = serializers.CharField( + required=True, validators=[_validatePhoneNumber] + ) fnr = serializers.CharField( required=False, validators=[_validateNorwegianNationalIdNumber] ) diff --git a/gregui/tests/api/test_invitation.py b/gregui/tests/api/test_invitation.py index 356a198d..d4ed39df 100644 --- a/gregui/tests/api/test_invitation.py +++ b/gregui/tests/api/test_invitation.py @@ -44,7 +44,7 @@ def test_get_invited_info_no_session(client, invitation_link): @pytest.mark.django_db def test_get_invited_info_session_okay( - client, invitation_link, person_foo_data, sponsor_guy_data, role_type_foo, unit_foo + client, invitation_link, person_foo_data, sponsor_guy_data, role_type_foo, unit_foo ): # get a session client.get( @@ -78,7 +78,7 @@ def test_get_invited_info_session_okay( @pytest.mark.django_db def test_get_invited_info_expired_link( - client, invitation_link, invitation_expired_date + client, invitation_link, invitation_expired_date ): # Get a session while link is valid client.get( @@ -96,7 +96,7 @@ def test_get_invited_info_expired_link( @pytest.mark.django_db def test_invited_guest_can_post_information( - client: APIClient, invitation_link, person_foo_data + client: APIClient, invitation_link, person_foo_data ): # get a session client.get( @@ -125,7 +125,7 @@ def test_invited_guest_can_post_information( @pytest.mark.django_db def test_post_invited_info_expired_session( - client, invitation_link, invitation_expired_date + client, invitation_link, invitation_expired_date ): # get a session client.get( @@ -158,7 +158,7 @@ def test_post_invited_info_deleted_inv_link(client, invitation_link): @pytest.mark.django_db def test_post_invited_info_invalid_national_id_number( - client, invitation_link, person_foo_data, person + client, invitation_link, person_foo_data, person ): data = {"mobile_phone": "+4707543001", "email": "test@example.com", "fnr": "123"} url = reverse("gregui-v1:invited-info") @@ -179,7 +179,7 @@ def test_post_invited_info_invalid_national_id_number( @pytest.mark.django_db def test_post_invited_info_valid_national_id_number( - client, invitation_link, person_foo_data, person + client, invitation_link, person_foo_data, person ): fnr = "11120618212" data = {"mobile_phone": "+4797543992", "email": "test@example.com", "fnr": fnr} -- GitLab