@@ -34,7 +34,9 @@ def _update_grant(graphql_client, grant, **kwargs):
3434 validationNeedAccommodation: needAccommodation
3535 validationWhy: why
3636 validationNotes: notes
37- validationTravellingFrom: travellingFrom
37+ validationDepartureCountry: departureCountry
38+ validationNationality: nationality
39+ validationDepartureCity: departureCity
3840 validationParticipantBio: participantBio
3941 validationParticipantWebsite: participantWebsite
4042 validationParticipantTwitterHandle: participantTwitterHandle
@@ -65,7 +67,9 @@ def _update_grant(graphql_client, grant, **kwargs):
6567 "needAccommodation" : grant .need_accommodation ,
6668 "why" : grant .why ,
6769 "notes" : grant .notes ,
68- "travellingFrom" : grant .travelling_from ,
70+ "departureCountry" : grant .departure_country ,
71+ "nationality" : grant .nationality ,
72+ "departureCity" : grant .departure_city ,
6973 "participantBio" : "bio" ,
7074 "participantWebsite" : "http://website.it" ,
7175 "participantTwitterHandle" : "handle" ,
@@ -109,7 +113,9 @@ def test_update_grant(graphql_client, user):
109113 needAccommodation = True ,
110114 why = "why not" ,
111115 notes = "🧸" ,
112- travellingFrom = "GB" ,
116+ departureCountry = "GB" ,
117+ nationality = "Italian" ,
118+ departureCity = "Rome" ,
113119 participantFacebookUrl = "http://facebook.com/pythonpizza" ,
114120 participantLinkedinUrl = "http://linkedin.com/company/pythonpizza" ,
115121 )
@@ -205,13 +211,21 @@ def test_cannot_update_submission_with_lang_outside_allowed_values(
205211 graphql_client ,
206212 grant = grant ,
207213 name = "Marcotte" * 50 ,
208- travellingFrom = "Very long location" * 50 ,
214+ departureCountry = "Very long location" * 50 ,
215+ nationality = "Freedonia" * 50 ,
216+ departureCity = "Emerald City " * 50 ,
209217 )
210218
211219 assert response ["data" ]["updateGrant" ]["__typename" ] == "GrantErrors"
212220 assert response ["data" ]["updateGrant" ]["errors" ]["validationName" ] == [
213221 "name: Cannot be more than 300 chars"
214222 ]
215- assert response ["data" ]["updateGrant" ]["errors" ]["validationTravellingFrom" ] == [
216- "travelling_from: Cannot be more than 200 chars"
223+ assert response ["data" ]["updateGrant" ]["errors" ]["validationDepartureCountry" ] == [
224+ "departure_country: Cannot be more than 100 chars"
225+ ]
226+ assert response ["data" ]["updateGrant" ]["errors" ]["validationNationality" ] == [
227+ "nationality: Cannot be more than 100 chars"
228+ ]
229+ assert response ["data" ]["updateGrant" ]["errors" ]["validationDepartureCity" ] == [
230+ "departure_city: Cannot be more than 100 chars"
217231 ]
0 commit comments