cuenca-validations 2.1.10.dev1__py3-none-any.whl → 2.1.10.dev2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ __all__ = [
7
7
  'BalanceEntryQuery',
8
8
  'BankAccountValidationQuery',
9
9
  'BankAccountValidationRequest',
10
+ 'PostalCodeQuery',
10
11
  'BankAccountStatus',
11
12
  'BatchFileMetadata',
12
13
  'Beneficiary',
@@ -55,6 +56,7 @@ __all__ = [
55
56
  'PlatformRequest',
56
57
  'PlatformType',
57
58
  'PosCapability',
59
+ 'Profession',
58
60
  'QueryParams',
59
61
  'Rfc',
60
62
  'QuestionnairesRequest',
@@ -134,6 +136,7 @@ from .enums import (
134
136
  Language,
135
137
  PlatformType,
136
138
  PosCapability,
139
+ Profession,
137
140
  SATRegimeCode,
138
141
  SavingCategory,
139
142
  ServiceProviderCategory,
@@ -183,6 +186,7 @@ from .queries import (
183
186
  EventQuery,
184
187
  FileQuery,
185
188
  IdentityQuery,
189
+ PostalCodeQuery,
186
190
  QueryParams,
187
191
  SessionQuery,
188
192
  StatementQuery,
@@ -688,3 +688,19 @@ class SATRegimeCode(str, Enum):
688
688
  ING_PREM = "615" # Régimen de los ingresos por obtención de premios
689
689
  AE_PLAT_TEC = "625" # Régimen de las Actividades Empresariales con ingresos a través de Plataformas Tecnológicas # noqa: E501
690
690
  RS_CONF = "626" # Régimen Simplificado de Confianza
691
+
692
+
693
+ class Profession(str, Enum):
694
+ artisticas = 'Actividades Artísticas'
695
+ agropecuario = 'Agricultura, Ganadería o Pesca'
696
+ comercio = 'Comercio'
697
+ estudiante = 'Estudiante'
698
+ empleado = 'Empleado(a/e)'
699
+ emprendimiento = 'Emprendimiento'
700
+ hogar = 'Hogar'
701
+ profesor = 'Profesor(a/e)'
702
+ profesionista = 'Profesionista'
703
+ servidor_publico = 'Servidor(a/e) Público'
704
+ sistemas = 'Sistemas y Comunicaciones'
705
+ independiente = 'Trabajador(a/e) Independiente'
706
+ oficios = 'Oficios Varios'
@@ -1,18 +1,11 @@
1
1
  import datetime as dt
2
- from typing import Annotated, Any, Optional
2
+ from typing import Annotated, Optional
3
3
 
4
- from pydantic import (
5
- BaseModel,
6
- ConfigDict,
7
- Field,
8
- SecretStr,
9
- StringConstraints,
10
- model_validator,
11
- )
4
+ from pydantic import BaseModel, ConfigDict, Field, SecretStr, StringConstraints
12
5
  from pydantic_extra_types.phone_numbers import PhoneNumber
13
6
 
14
7
  from .enums import Country, KYCFileType, State, VerificationStatus
15
- from .general import SerializableIPvAnyAddress
8
+ from .general import NonEmptyStr, SerializableIPvAnyAddress
16
9
 
17
10
  Password = Annotated[
18
11
  SecretStr,
@@ -43,6 +36,13 @@ Rfc = Annotated[
43
36
  ),
44
37
  ]
45
38
 
39
+ # NOTE:
40
+ # The Address model is kept for compatibility with legacy models and data
41
+ # that expect all address fields to be optional. This allows older systems
42
+ # or stored data using Address to continue working without breaking changes.
43
+ # For new request validation, use AddressRequest, which enforces required
44
+ # fields and is intended for validating incoming data.
45
+
46
46
 
47
47
  class Address(BaseModel):
48
48
  street: Optional[str] = None
@@ -69,16 +69,24 @@ class Address(BaseModel):
69
69
  }
70
70
  )
71
71
 
72
- @model_validator(mode='before')
73
- @classmethod
74
- def full_name_complete(cls, values: dict[str, Any]) -> dict[str, Any]:
75
- if values.get('full_name'):
76
- return values
77
- if not values.get('street'):
78
- raise ValueError('required street')
79
- if not values.get('ext_number'):
80
- raise ValueError('required ext_number')
81
- return values
72
+
73
+ class AddressRequest(BaseModel):
74
+ # This model is mainly for request validation, enforcing required fields.
75
+ street: NonEmptyStr
76
+ ext_number: NonEmptyStr
77
+ int_number: Optional[NonEmptyStr] = None
78
+ postal_code_id: NonEmptyStr
79
+
80
+ model_config = ConfigDict(
81
+ json_schema_extra={
82
+ "example": {
83
+ "street": "Reforma",
84
+ "ext_number": "265",
85
+ "int_number": "5",
86
+ "postal_code_id": "PC2ygq9j2bS9-9tsuVawzErA",
87
+ }
88
+ }
89
+ )
82
90
 
83
91
 
84
92
  class Beneficiary(BaseModel):
@@ -86,7 +94,7 @@ class Beneficiary(BaseModel):
86
94
  birth_date: dt.date
87
95
  phone_number: PhoneNumber
88
96
  user_relationship: str
89
- percentage: int
97
+ percentage: Annotated[int, Field(ge=1, le=100)]
90
98
  model_config = ConfigDict(
91
99
  json_schema_extra={
92
100
  "example": {
@@ -3,7 +3,8 @@ from typing import Optional
3
3
 
4
4
  from pydantic import BaseModel, EmailStr
5
5
 
6
- from cuenca_validations.types import Address, Curp, PhoneNumber, Rfc
6
+ from ..types import Curp, PhoneNumber, Rfc
7
+ from .identities import AddressRequest
7
8
 
8
9
 
9
10
  class BusinessDetails(BaseModel):
@@ -60,7 +61,7 @@ class LegalRepresentative(PhysicalPerson):
60
61
  job: str
61
62
  phone_number: PhoneNumber
62
63
  email_address: EmailStr
63
- address: Address
64
+ address: AddressRequest
64
65
 
65
66
 
66
67
  class ShareholderPhysical(PhysicalPerson):
@@ -7,6 +7,7 @@ from pydantic import (
7
7
  EmailStr,
8
8
  Field,
9
9
  PositiveInt,
10
+ StringConstraints,
10
11
  field_validator,
11
12
  )
12
13
 
@@ -179,3 +180,15 @@ class FileQuery(QueryParams):
179
180
  class BankAccountValidationQuery(QueryParams):
180
181
  account_number: Optional[str] = None
181
182
  status: Optional[BankAccountStatus] = None
183
+
184
+
185
+ class PostalCodeQuery(QueryParams):
186
+ postal_code: Annotated[
187
+ str,
188
+ StringConstraints(
189
+ strip_whitespace=True,
190
+ min_length=5,
191
+ max_length=5,
192
+ pattern=r'^\d+$',
193
+ ),
194
+ ]
@@ -32,6 +32,7 @@ from ..types.enums import (
32
32
  KYCValidationSource,
33
33
  PlatformType,
34
34
  PosCapability,
35
+ Profession,
35
36
  SavingCategory,
36
37
  SessionType,
37
38
  State,
@@ -39,7 +40,6 @@ from ..types.enums import (
39
40
  TrackDataMethod,
40
41
  TransactionTokenValidationStatus,
41
42
  UserCardNotification,
42
- UserStatus,
43
43
  VerificationType,
44
44
  WalletTransactionType,
45
45
  WebhookEvent,
@@ -64,14 +64,13 @@ from .general import (
64
64
  StrictPositiveInt,
65
65
  )
66
66
  from .identities import (
67
- Address,
67
+ AddressRequest,
68
68
  Beneficiary,
69
69
  Curp,
70
70
  KYCFile,
71
71
  Password,
72
72
  PhoneNumber,
73
73
  Rfc,
74
- TOSAgreement,
75
74
  )
76
75
  from .morals import (
77
76
  AuditDetails,
@@ -407,46 +406,29 @@ class TOSRequest(BaseModel):
407
406
  class UserTOSAgreementRequest(BaseModel):
408
407
  tos_id: str
409
408
  location: Coordinate
409
+ signature_image_url: Optional[SerializableHttpUrl] = None
410
410
 
411
411
 
412
412
  class UserRequest(BaseModel):
413
- id: Optional[str] = Field(
414
- None, description='if you want to create with specific `id`'
415
- )
416
413
  curp: Curp = Field(
417
- description='Previously validated in `curp_validations`'
418
- )
419
- phone_number: Optional[PhoneNumber] = Field(
420
- None, description='Only if you validated previously on your side'
421
- )
422
- email_address: Optional[EmailStr] = Field(
423
- None, description='Only if you validated previously on your side'
424
- )
425
- profession: Optional[str] = None
426
- address: Optional[Address] = None
427
- status: Optional[UserStatus] = Field(
428
- None,
429
- description='Status that the user will have when created. '
430
- 'Defined by platform',
414
+ description=(
415
+ 'Mexican government ID (18 characters). ' 'Must be pre-validated.'
416
+ )
431
417
  )
432
- required_level: Optional[int] = Field(
433
- None,
434
- ge=1,
435
- le=3,
436
- description='Maximum level a User can reach. Defined by platform',
418
+
419
+ profession: Profession = Field(description='User profession or occupation')
420
+ address: AddressRequest = Field(
421
+ description='User residential address information'
437
422
  )
438
- phone_verification_id: Optional[str] = Field(
439
- None,
440
- description='Only if you validated it previously with the '
441
- 'resource `verifications`',
423
+ phone_verification_id: str = Field(
424
+ ...,
425
+ description='ID of previously validated phone verification',
442
426
  )
443
- email_verification_id: Optional[str] = Field(
444
- None,
445
- description='Only if you validated it previously with the '
446
- 'resource `verifications`',
427
+ email_verification_id: str = Field(
428
+ ...,
429
+ description='ID of previously validated email verification',
447
430
  )
448
- terms_of_service: Optional[TOSRequest] = None
449
- signature: Optional[KYCFile] = None
431
+
450
432
  model_config = ConfigDict(
451
433
  json_schema_extra={
452
434
  'example': {
@@ -454,7 +436,7 @@ class UserRequest(BaseModel):
454
436
  'phone_number': '+525511223344',
455
437
  'email_address': 'user@example.com',
456
438
  'profession': 'engineer',
457
- 'address': Address.schema().get('example'),
439
+ 'address': AddressRequest.model_json_schema().get('example'),
458
440
  }
459
441
  },
460
442
  )
@@ -479,21 +461,16 @@ class UserRequest(BaseModel):
479
461
 
480
462
 
481
463
  class UserUpdateRequest(BaseModel):
482
- phone_number: Optional[PhoneNumber] = None
483
- email_address: Optional[EmailStr] = None
484
- profession: Optional[str] = None
464
+ profession: Optional[Profession] = None
485
465
  verification_id: Optional[str] = None
486
466
  email_verification_id: Optional[str] = None
487
467
  phone_verification_id: Optional[str] = None
488
- address: Optional[Address] = None
468
+ address: Optional[AddressRequest] = None
489
469
  beneficiaries: Optional[list[Beneficiary]] = None
490
470
  govt_id: Optional[KYCFile] = None
491
471
  proof_of_address: Optional[KYCFile] = None
492
472
  proof_of_life: Optional[KYCFile] = None
493
473
  signature: Optional[KYCFile] = None
494
- status: Optional[UserStatus] = None
495
- terms_of_service: Optional[TOSRequest] = None
496
- platform_terms_of_service: Optional[TOSAgreement] = None
497
474
  curp_document_uri: Optional[SerializableHttpUrl] = None
498
475
 
499
476
  @field_validator('beneficiaries')
@@ -501,8 +478,8 @@ class UserUpdateRequest(BaseModel):
501
478
  def beneficiary_percentage(
502
479
  cls, beneficiaries: Optional[list[Beneficiary]] = None
503
480
  ):
504
- if beneficiaries and sum(b.percentage for b in beneficiaries) > 100:
505
- raise ValueError('The total percentage is more than 100.')
481
+ if beneficiaries and sum(b.percentage for b in beneficiaries) != 100:
482
+ raise ValueError('The total percentage should be 100%')
506
483
  return beneficiaries
507
484
 
508
485
 
@@ -707,7 +684,7 @@ class PartnerRequest(BaseRequest):
707
684
  web_site: str
708
685
  phone_number: PhoneNumber
709
686
  email_address: EmailStr
710
- address: Address
687
+ address: AddressRequest
711
688
 
712
689
 
713
690
  class PartnerUpdateRequest(BaseRequest):
@@ -721,7 +698,7 @@ class PartnerUpdateRequest(BaseRequest):
721
698
  web_site: Optional[str] = None
722
699
  phone_number: Optional[PhoneNumber] = None
723
700
  email_address: Optional[EmailStr] = None
724
- address: Optional[Address] = None
701
+ address: Optional[AddressRequest] = None
725
702
  business_details: Optional[BusinessDetails] = None
726
703
  transactional_profile: Optional[TransactionalProfile] = None
727
704
  external_account: Optional[Clabe] = None
@@ -1 +1 @@
1
- __version__ = '2.1.10.dev1'
1
+ __version__ = '2.1.10.dev2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cuenca_validations
3
- Version: 2.1.10.dev1
3
+ Version: 2.1.10.dev2
4
4
  Summary: Cuenca common validations
5
5
  Home-page: https://github.com/cuenca-mx/cuenca-validations
6
6
  Author: Cuenca
@@ -4,25 +4,25 @@ cuenca_validations/errors.py,sha256=OtM8EgiKqYdz9Hn66AbBO96orL1or7efkyt0vh0Zxbs,
4
4
  cuenca_validations/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  cuenca_validations/typing.py,sha256=1QCu81IbVZZpyInjyeAuO-nF36gpT5Gi4o6V9PozuOU,204
6
6
  cuenca_validations/validators.py,sha256=wzwLnJ4wHggZvqp3mearbFkzvDERGeTNvJkuofQnuMc,1484
7
- cuenca_validations/version.py,sha256=5eGaTFo3hIdPpcREMMuwCh8KXJ9UUCnbGEI5w4pINq4,28
8
- cuenca_validations/types/__init__.py,sha256=UNb7auBcD0qp-x9TX7TNNj8IKo7uaI7xHaf9PYmaziY,4765
7
+ cuenca_validations/version.py,sha256=Ljyb3i07pbp39dc_25_l_pyPzl5zdHnFK9FpoZgYJOA,28
8
+ cuenca_validations/types/__init__.py,sha256=fPmHzU6mY6l3qK2R8cOhjcrICTOnoHS6VQteX663FRE,4843
9
9
  cuenca_validations/types/card.py,sha256=UGzz8NTFAverUmdUKAK1oGHnOnjSNTpIRUm93vKSSGY,1295
10
- cuenca_validations/types/enums.py,sha256=Vm9HGf83jPkEp8iZ-KGtKGWQGx5q-cIUuQj32y_QcvU,18997
10
+ cuenca_validations/types/enums.py,sha256=533fUCip5CXMD7m4Ww8VAcB5Yr4A0EmT5GBRt2mF4b0,19510
11
11
  cuenca_validations/types/files.py,sha256=2CszbwF9ytXV9suFFwyDjYG4XxY8UhCjRw3HttVXXNw,269
12
12
  cuenca_validations/types/general.py,sha256=vJmQBD_Iv_hsxD8x3_Bip-NlYAiE2rmXSPQKj4kTtto,2621
13
13
  cuenca_validations/types/helpers.py,sha256=6rHUhwoQ7jJZtGcW3LX-W5ZDl42PWE1RoBpGme7KCkk,610
14
- cuenca_validations/types/identities.py,sha256=-TWRDRpmIaCI4nE4hVy1FQtQtlxuErtmEtzJW1FBzec,4956
15
- cuenca_validations/types/morals.py,sha256=m8kAedevmwfSPTA9GYe03l7pkgipynwYgKfejyVtnuI,1813
16
- cuenca_validations/types/queries.py,sha256=KCRx0sPzWDtDDbZysmFGVgANgfqil17EITWaG7tGQ-A,4700
17
- cuenca_validations/types/requests.py,sha256=h8RgEO6_lMvDHC0yoq8W6qWBq8s6u-Ktr_rW7zFj8LQ,21258
18
- cuenca_validations-2.1.10.dev1.dist-info/licenses/LICENSE,sha256=wR76FmxBbfnQpwELkkE5iMF8sFIafEMgXLTE4N4WPTc,1063
14
+ cuenca_validations/types/identities.py,sha256=1wkutHzL9Gpd9oAZdyiikNxWKe5iBVAQT3TabR6YG1o,5451
15
+ cuenca_validations/types/morals.py,sha256=davabh5hAnFVQyM7-yCyDaT5ewXnm0cr1BtqDIwzkX8,1833
16
+ cuenca_validations/types/queries.py,sha256=5VHVyTcN9lELcCNXL_b7kWXWw5-6e7G3NTVPF8FT11Y,4963
17
+ cuenca_validations/types/requests.py,sha256=gAenndrOFczTM5-7d87IQaqmsuyThW9OJVBg4bZQVRE,20394
18
+ cuenca_validations-2.1.10.dev2.dist-info/licenses/LICENSE,sha256=wR76FmxBbfnQpwELkkE5iMF8sFIafEMgXLTE4N4WPTc,1063
19
19
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  tests/test_card.py,sha256=QAfRz7e11gWICPnFJZ2tiYgUsFV3C9TwzJXrDnDNXFw,1202
21
21
  tests/test_errors.py,sha256=ixiIgEuBuzfsL5p4uCFdF32XqFRtTPF6EVhGJ0keOrI,930
22
22
  tests/test_helpers.py,sha256=ubzpi1UXCryLQdgsT_Zm2IX-XE_4L0dnHnhLwH06xK8,748
23
23
  tests/test_statement.py,sha256=IOE0rRRBgBZSJv_FLaETEyn5NzzXKMNTqgjv99GX-68,1436
24
- tests/test_types.py,sha256=PQ_tffbKOhugC_VhlxXqMimx2iRDUUVH7E6zXJLdrac,19292
25
- cuenca_validations-2.1.10.dev1.dist-info/METADATA,sha256=9hwqqrcY1ICd0mpTjA7WtIYnnw_oJcRiRLg5SHudSc0,1600
26
- cuenca_validations-2.1.10.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- cuenca_validations-2.1.10.dev1.dist-info/top_level.txt,sha256=4233xdOs2HtuT-GFRjcDcwK0IwdwvWdczOtk0fPB6Gw,25
28
- cuenca_validations-2.1.10.dev1.dist-info/RECORD,,
24
+ tests/test_types.py,sha256=agu5f7cbKv2SPuX8CE3Xp7K_s-MW-oLQjj86BWKcXbw,18811
25
+ cuenca_validations-2.1.10.dev2.dist-info/METADATA,sha256=WT1IXEN9Nibqy4a0Fd4_W2DPhCcblLndlF_7jO143S8,1600
26
+ cuenca_validations-2.1.10.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ cuenca_validations-2.1.10.dev2.dist-info/top_level.txt,sha256=4233xdOs2HtuT-GFRjcDcwK0IwdwvWdczOtk0fPB6Gw,25
28
+ cuenca_validations-2.1.10.dev2.dist-info/RECORD,,
tests/test_types.py CHANGED
@@ -10,7 +10,6 @@ from pydantic import AfterValidator, BaseModel, SecretStr, ValidationError
10
10
  from pydantic.fields import FieldInfo
11
11
 
12
12
  from cuenca_validations.types import (
13
- Address,
14
13
  CardQuery,
15
14
  JSONEncoder,
16
15
  QueryParams,
@@ -21,8 +20,8 @@ from cuenca_validations.types import (
21
20
  get_state_name,
22
21
  )
23
22
  from cuenca_validations.types.enums import (
24
- Country,
25
23
  EcommerceIndicator,
24
+ Profession,
26
25
  SessionType,
27
26
  State,
28
27
  )
@@ -303,60 +302,42 @@ def test_saving_update_request():
303
302
  SavingUpdateRequest(**data)
304
303
 
305
304
 
306
- def test_address_validation():
307
- data = dict(
308
- full_name='Varsovia 36, Col Cuahutemoc',
309
- )
310
- assert Address(**data)
311
- with pytest.raises(ValueError) as v:
312
- Address(**dict())
313
- assert 'required street' in str(v)
314
- data = dict(street='somestreet')
315
- with pytest.raises(ValueError) as v:
316
- Address(**data)
317
- assert 'required ext_number' in str(v)
318
- data = dict(
319
- street='varsovia',
320
- ext_number='36',
321
- state=State.DF,
322
- country=Country.MX,
305
+ @freeze_time('2022-01-01')
306
+ def test_user_request():
307
+ request = dict(
308
+ curp='ABCD920604HDFSRN03',
309
+ profession=Profession.empleado,
310
+ address=dict(
311
+ street='calle 1',
312
+ ext_number='2',
313
+ int_number='3',
314
+ postal_code_id='PC2ygq9j2bS9-9tsuVawzErA',
315
+ ),
316
+ phone_verification_id='VE12345678',
317
+ email_verification_id='VE0987654321',
323
318
  )
324
- assert Address(**data)
319
+ assert UserRequest(**request).model_dump() == request
325
320
 
326
321
 
327
322
  @freeze_time('2022-01-01')
328
- def test_user_request():
323
+ def test_user_request_underage():
329
324
  request = dict(
330
- id=None,
331
- curp='ABCD920604HDFSRN03',
332
- phone_number='+525555555555',
333
- email_address='email@email.com',
325
+ curp='ABCD060604HDFSRN03', # underage CURP
334
326
  profession='worker',
335
- status='active',
336
327
  address=dict(
337
328
  street='calle 1',
338
329
  ext_number='2',
339
330
  int_number='3',
340
- colonia='Juarez',
341
- postal_code='09900',
342
- state=State.DF.value,
343
- country=Country.MX,
344
- city='Obrera',
345
- full_name=None,
331
+ postal_code_id='PC2ygq9j2bS9-9tsuVawzErA',
346
332
  ),
347
333
  phone_verification_id='VE12345678',
348
334
  email_verification_id='VE0987654321',
349
- required_level=3,
350
- terms_of_service=None,
351
- signature=None,
352
335
  )
353
- assert UserRequest(**request).model_dump() == request
354
336
 
355
- # changing curp so user is underage
356
- request['curp'] = 'ABCD060604HDFSRN03'
357
337
  with pytest.raises(ValueError) as v:
358
338
  UserRequest(**request)
359
- assert 'User does not meet age requirement.' in str(v)
339
+
340
+ assert 'User does not meet age requirement.' in str(v)
360
341
 
361
342
 
362
343
  @freeze_time('2022-01-01')
@@ -438,7 +419,7 @@ def test_user_update_request():
438
419
  birth_date=dt.date(2020, 1, 1).isoformat(),
439
420
  phone_number='+525555555555',
440
421
  user_relationship='brother',
441
- percentage=50,
422
+ percentage=100,
442
423
  ),
443
424
  ]
444
425
  assert UserUpdateRequest(**request)
@@ -449,12 +430,21 @@ def test_user_update_request():
449
430
  birth_date=dt.date(2020, 1, 1).isoformat(),
450
431
  phone_number='+525555555555',
451
432
  user_relationship='brother',
452
- percentage=101,
433
+ percentage=50,
434
+ ),
435
+ dict(
436
+ name='José Pérez',
437
+ birth_date=dt.date(2020, 1, 2).isoformat(),
438
+ phone_number='+525544444444',
439
+ user_relationship='brother',
440
+ percentage=51,
453
441
  ),
454
442
  ]
455
- with pytest.raises(ValueError) as v:
443
+ with pytest.raises(ValidationError) as v:
456
444
  UserUpdateRequest(**request)
457
- assert 'The total percentage is more than 100.' in str(v)
445
+
446
+ assert 'The total percentage should be 100%' in str(v)
447
+ request.pop('beneficiaries')
458
448
 
459
449
  tos_request = dict(
460
450
  terms_of_service=dict(
@@ -485,12 +475,6 @@ def test_user_update_request():
485
475
  )
486
476
  UserUpdateRequest(**kyc_request)
487
477
 
488
- # chagning to invalid request
489
- tos_request['terms_of_service']['ip'] = 'not valid ip'
490
- with pytest.raises(ValueError) as v:
491
- UserUpdateRequest(**tos_request)
492
- assert 'not valid ip' in str(v.value)
493
-
494
478
 
495
479
  def test_session_request():
496
480
  data = dict(