@@ -22,7 +22,8 @@ def _create_order(graphql_client, code, input):
22
22
errors {
23
23
nonFieldErrors
24
24
invoiceInformation {
25
- name
25
+ givenName
26
+ familyName
26
27
street
27
28
zipcode
28
29
fiscalCode
@@ -79,7 +80,8 @@ def test_cannot_create_order_unlogged(graphql_client):
79
80
"invoiceInformation" : {
80
81
"isBusiness" : False ,
81
82
"company" : "" ,
82
- "name" : "Patrick" ,
83
+ "givenName" : "Patrick" ,
84
+ "familyName" : "Arminio" ,
83
85
"street" : "street" ,
84
86
"zipcode" : "92100" ,
85
87
"city" : "Avellino" ,
@@ -133,7 +135,8 @@ def test_calls_create_order(graphql_client, user, mocker, requests_mock, pretix_
133
135
"invoiceInformation" : {
134
136
"isBusiness" : False ,
135
137
"company" : "" ,
136
- "name" : "Patrick" ,
138
+ "givenName" : "Patrick" ,
139
+ "familyName" : "Arminio" ,
137
140
"street" : "street" ,
138
141
"zipcode" : "92100" ,
139
142
"city" : "Avellino" ,
@@ -154,7 +157,8 @@ def test_calls_create_order(graphql_client, user, mocker, requests_mock, pretix_
154
157
155
158
billing_address = BillingAddress .objects .get (user = user )
156
159
157
- assert billing_address .user_name == "Patrick"
160
+ assert billing_address .user_given_name == "Patrick"
161
+ assert billing_address .user_family_name == "Arminio"
158
162
assert billing_address .company_name == ""
159
163
assert not billing_address .is_business
160
164
assert billing_address .address == "street"
@@ -209,7 +213,8 @@ def test_calls_create_order_doesnt_require_attendee_data_for_non_admission_produ
209
213
"invoiceInformation" : {
210
214
"isBusiness" : False ,
211
215
"company" : "" ,
212
- "name" : "Patrick" ,
216
+ "givenName" : "Patrick" ,
217
+ "familyName" : "Arminio" ,
213
218
"street" : "street" ,
214
219
"zipcode" : "92100" ,
215
220
"city" : "Avellino" ,
@@ -230,7 +235,8 @@ def test_calls_create_order_doesnt_require_attendee_data_for_non_admission_produ
230
235
231
236
billing_address = BillingAddress .objects .get (user = user )
232
237
233
- assert billing_address .user_name == "Patrick"
238
+ assert billing_address .user_given_name == "Patrick"
239
+ assert billing_address .user_family_name == "Arminio"
234
240
assert billing_address .company_name == ""
235
241
assert not billing_address .is_business
236
242
assert billing_address .address == "street"
@@ -287,7 +293,8 @@ def test_handles_payment_url_set_to_none(
287
293
"invoiceInformation" : {
288
294
"isBusiness" : False ,
289
295
"company" : "" ,
290
- "name" : "Patrick" ,
296
+ "givenName" : "Patrick" ,
297
+ "familyName" : "Arminio" ,
291
298
"street" : "street" ,
292
299
"zipcode" : "92100" ,
293
300
"city" : "Avellino" ,
@@ -343,7 +350,8 @@ def test_handles_errors(graphql_client, user, mocker, requests_mock, pretix_item
343
350
"invoiceInformation" : {
344
351
"isBusiness" : False ,
345
352
"company" : "" ,
346
- "name" : "Patrick" ,
353
+ "givenName" : "Patrick" ,
354
+ "familyName" : "Arminio" ,
347
355
"street" : "street" ,
348
356
"zipcode" : "92100" ,
349
357
"city" : "Avellino" ,
@@ -383,7 +391,8 @@ def test_invoice_validation_fails_without_required_field_in_country_italy(
383
391
data = {
384
392
"isBusiness" : False ,
385
393
"company" : "" ,
386
- "name" : "Patrick" ,
394
+ "givenName" : "Patrick" ,
395
+ "familyName" : "Arminio" ,
387
396
"street" : "street" ,
388
397
"zipcode" : "92100" ,
389
398
"city" : "Avellino" ,
@@ -430,7 +439,8 @@ def test_invoice_validation_fails_without_required_field_in_country_italy(
430
439
431
440
@override_settings (FRONTEND_URL = "http://test.it" )
432
441
@pytest .mark .parametrize (
433
- "field_to_delete" , ["name" , "street" , "zipcode" , "city" , "country" ]
442
+ "field_to_delete" ,
443
+ ["givenName" , "familyName" , "street" , "zipcode" , "city" , "country" ],
434
444
)
435
445
def test_invoice_validation_fails_with_missing_required_fields (
436
446
graphql_client , user , mocker , field_to_delete , requests_mock , pretix_items
@@ -449,7 +459,8 @@ def test_invoice_validation_fails_with_missing_required_fields(
449
459
data = {
450
460
"isBusiness" : False ,
451
461
"company" : "" ,
452
- "name" : "Patrick" ,
462
+ "givenName" : "Patrick" ,
463
+ "familyName" : "Arminio" ,
453
464
"street" : "street" ,
454
465
"zipcode" : "92100" ,
455
466
"city" : "Avellino" ,
@@ -533,7 +544,8 @@ def test_fiscal_code_not_required_for_non_it_orders(
533
544
"invoiceInformation" : {
534
545
"isBusiness" : False ,
535
546
"company" : "" ,
536
- "name" : "Patrick" ,
547
+ "givenName" : "Patrick" ,
548
+ "familyName" : "Arminio" ,
537
549
"street" : "street" ,
538
550
"zipcode" : "92100" ,
539
551
"city" : "Avellino" ,
@@ -590,7 +602,8 @@ def test_invoice_validation_fails_with_invalid_fiscal_code_in_country_italy(
590
602
"invoiceInformation" : {
591
603
"isBusiness" : False ,
592
604
"company" : "" ,
593
- "name" : "Patrick" ,
605
+ "givenName" : "Patrick" ,
606
+ "familyName" : "Arminio" ,
594
607
"street" : "street" ,
595
608
"zipcode" : "92100" ,
596
609
"city" : "Avellino" ,
@@ -650,7 +663,8 @@ def test_invoice_validation_checks_pec_email_if_provided(
650
663
"invoiceInformation" : {
651
664
"isBusiness" : False ,
652
665
"company" : "" ,
653
- "name" : "Patrick" ,
666
+ "givenName" : "Patrick" ,
667
+ "familyName" : "Arminio" ,
654
668
"street" : "street" ,
655
669
"zipcode" : "92100" ,
656
670
"city" : "Avellino" ,
@@ -711,7 +725,8 @@ def test_invoice_validation_fails_with_empty_vat_for_businesses(
711
725
"invoiceInformation" : {
712
726
"isBusiness" : True ,
713
727
"company" : "business" ,
714
- "name" : "Patrick" ,
728
+ "givenName" : "Patrick" ,
729
+ "familyName" : "Arminio" ,
715
730
"street" : "street" ,
716
731
"zipcode" : "92100" ,
717
732
"city" : "Avellino" ,
@@ -771,7 +786,8 @@ def test_invoice_validation_fails_with_empty_business_name_for_businesses(
771
786
"invoiceInformation" : {
772
787
"isBusiness" : True ,
773
788
"company" : "" ,
774
- "name" : "Patrick" ,
789
+ "givenName" : "Patrick" ,
790
+ "familyName" : "Arminio" ,
775
791
"street" : "street" ,
776
792
"zipcode" : "92100" ,
777
793
"city" : "Avellino" ,
@@ -831,7 +847,8 @@ def test_invoice_validation_fails_with_invalid_country_code(
831
847
"invoiceInformation" : {
832
848
"isBusiness" : True ,
833
849
"company" : "name" ,
834
- "name" : "Patrick" ,
850
+ "givenName" : "Patrick" ,
851
+ "familyName" : "Arminio" ,
835
852
"street" : "street" ,
836
853
"zipcode" : "92100" ,
837
854
"city" : "Avellino" ,
@@ -891,7 +908,8 @@ def test_invoice_validation_fails_when_italian_business_and_no_sdi(
891
908
"invoiceInformation" : {
892
909
"isBusiness" : True ,
893
910
"company" : "LTD" ,
894
- "name" : "Patrick" ,
911
+ "givenName" : "Patrick" ,
912
+ "familyName" : "Arminio" ,
895
913
"street" : "street" ,
896
914
"zipcode" : "92100" ,
897
915
"city" : "Avellino" ,
@@ -952,7 +970,8 @@ def test_invoice_validation_fails_when_italian_business_with_invalid_sdi(
952
970
"invoiceInformation" : {
953
971
"isBusiness" : True ,
954
972
"company" : "LTD" ,
955
- "name" : "Patrick" ,
973
+ "givenName" : "Patrick" ,
974
+ "familyName" : "Arminio" ,
956
975
"street" : "street" ,
957
976
"zipcode" : "92100" ,
958
977
"city" : "Avellino" ,
@@ -1013,7 +1032,8 @@ def test_invoice_validation_fails_when_italian_zipcode_is_invalid(
1013
1032
"invoiceInformation" : {
1014
1033
"isBusiness" : True ,
1015
1034
"company" : "LTD" ,
1016
- "name" : "Patrick" ,
1035
+ "givenName" : "Patrick" ,
1036
+ "familyName" : "Arminio" ,
1017
1037
"street" : "street" ,
1018
1038
"zipcode" : "921" ,
1019
1039
"city" : "Avellino" ,
@@ -1074,7 +1094,8 @@ def test_order_creation_fails_if_attendee_name_is_empty(
1074
1094
"invoiceInformation" : {
1075
1095
"isBusiness" : False ,
1076
1096
"company" : "LTD" ,
1077
- "name" : "Patrick" ,
1097
+ "givenName" : "Patrick" ,
1098
+ "familyName" : "Arminio" ,
1078
1099
"street" : "street" ,
1079
1100
"zipcode" : "921" ,
1080
1101
"city" : "Avellino" ,
@@ -1135,7 +1156,8 @@ def test_order_creation_fails_if_attendee_email_is_empty(
1135
1156
"invoiceInformation" : {
1136
1157
"isBusiness" : False ,
1137
1158
"company" : "LTD" ,
1138
- "name" : "Patrick" ,
1159
+ "givenName" : "Patrick" ,
1160
+ "familyName" : "Arminio" ,
1139
1161
"street" : "street" ,
1140
1162
"zipcode" : "921" ,
1141
1163
"city" : "Avellino" ,
@@ -1196,7 +1218,8 @@ def test_order_creation_fails_if_attendee_email_is_invalid(
1196
1218
"invoiceInformation" : {
1197
1219
"isBusiness" : False ,
1198
1220
"company" : "LTD" ,
1199
- "name" : "Patrick" ,
1221
+ "givenName" : "Patrick" ,
1222
+ "familyName" : "Arminio" ,
1200
1223
"street" : "street" ,
1201
1224
"zipcode" : "921" ,
1202
1225
"city" : "Avellino" ,
@@ -1257,7 +1280,8 @@ def test_invoice_validation_works_when_not_italian_and_no_sdi(
1257
1280
"invoiceInformation" : {
1258
1281
"isBusiness" : True ,
1259
1282
"company" : "LTD" ,
1260
- "name" : "Patrick" ,
1283
+ "givenName" : "Patrick" ,
1284
+ "familyName" : "Arminio" ,
1261
1285
"street" : "street" ,
1262
1286
"zipcode" : "92100" ,
1263
1287
"city" : "Avellino" ,
@@ -1279,7 +1303,8 @@ def test_invoice_validation_works_when_not_italian_and_no_sdi(
1279
1303
1280
1304
billing_address = BillingAddress .objects .get (user = user )
1281
1305
1282
- assert billing_address .user_name == "Patrick"
1306
+ assert billing_address .user_given_name == "Patrick"
1307
+ assert billing_address .user_family_name == "Arminio"
1283
1308
assert billing_address .company_name == "LTD"
1284
1309
assert billing_address .is_business
1285
1310
@@ -1329,7 +1354,8 @@ def test_create_order_billing_address_stores_both_non_and_business(
1329
1354
"invoiceInformation" : {
1330
1355
"isBusiness" : True ,
1331
1356
"company" : "LTD" ,
1332
- "name" : "Patrick" ,
1357
+ "givenName" : "Patrick" ,
1358
+ "familyName" : "Arminio" ,
1333
1359
"street" : "street" ,
1334
1360
"zipcode" : "92100" ,
1335
1361
"city" : "Avellino" ,
@@ -1357,7 +1383,8 @@ def test_create_order_billing_address_stores_both_non_and_business(
1357
1383
1358
1384
billing_address = billing_addresses .get (is_business = True )
1359
1385
1360
- assert billing_address .user_name == "Patrick"
1386
+ assert billing_address .user_given_name == "Patrick"
1387
+ assert billing_address .user_family_name == "Arminio"
1361
1388
assert billing_address .company_name == "LTD"
1362
1389
assert billing_address .is_business
1363
1390
@@ -1407,7 +1434,8 @@ def test_create_order_updates_billing_address(
1407
1434
"invoiceInformation" : {
1408
1435
"isBusiness" : True ,
1409
1436
"company" : "LTD" ,
1410
- "name" : "Patrick" ,
1437
+ "givenName" : "Patrick" ,
1438
+ "familyName" : "Arminio" ,
1411
1439
"street" : "street" ,
1412
1440
"zipcode" : "92100" ,
1413
1441
"city" : "Avellino" ,
@@ -1430,6 +1458,7 @@ def test_create_order_updates_billing_address(
1430
1458
billing_address = BillingAddress .objects .get (user = user )
1431
1459
1432
1460
assert billing_address .id == existing_billing_address .id
1433
- assert billing_address .user_name == "Patrick"
1461
+ assert billing_address .user_given_name == "Patrick"
1462
+ assert billing_address .user_family_name == "Arminio"
1434
1463
assert billing_address .company_name == "LTD"
1435
1464
assert billing_address .is_business
0 commit comments