@@ -35,6 +35,8 @@ def _update_grant(graphql_client, grant, **kwargs):
3535 validationWhy: why
3636 validationNotes: notes
3737 validationTravellingFrom: travellingFrom
38+ validationNationality: nationality
39+ validationDepartureCity: departureCity
3840 validationParticipantBio: participantBio
3941 validationParticipantWebsite: participantWebsite
4042 validationParticipantTwitterHandle: participantTwitterHandle
@@ -66,6 +68,8 @@ def _update_grant(graphql_client, grant, **kwargs):
6668 "why" : grant .why ,
6769 "notes" : grant .notes ,
6870 "travellingFrom" : grant .travelling_from ,
71+ "nationality" : grant .nationality ,
72+ "departureCity" : grant .departure_city ,
6973 "participantBio" : "bio" ,
7074 "participantWebsite" : "http://website.it" ,
7175 "participantTwitterHandle" : "handle" ,
@@ -110,6 +114,8 @@ def test_update_grant(graphql_client, user):
110114 why = "why not" ,
111115 notes = "🧸" ,
112116 travellingFrom = "GB" ,
117+ nationality = "Italian" ,
118+ departureCity = "Rome" ,
113119 participantFacebookUrl = "http://facebook.com/pythonpizza" ,
114120 participantLinkedinUrl = "http://linkedin.com/company/pythonpizza" ,
115121 )
@@ -206,12 +212,20 @@ def test_cannot_update_submission_with_lang_outside_allowed_values(
206212 grant = grant ,
207213 name = "Marcotte" * 50 ,
208214 travellingFrom = "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 ]
215223 assert response ["data" ]["updateGrant" ]["errors" ]["validationTravellingFrom" ] == [
216- "travelling_from: Cannot be more than 200 chars"
224+ "travelling_from: 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