Skip to content

Commit 097e700

Browse files
iulian03Iulian Masar
and
Iulian Masar
authored
fixed categorize SCA user tests (#392)
Co-authored-by: Iulian Masar <iulian.masar@codegile.com>
1 parent 2a6d4b8 commit 097e700

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

tests/test_base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ def get_user_legal_sca_payer(recreate=False, terms=True):
323323
phone_number='0611111111',
324324
phone_number_country='FR')
325325
user.user_category = 'PAYER'
326+
user.legal_representative_address = Address(address_line_1='AddressLine1', address_line_2='AddressLine2',
327+
city='City', region='Region',
328+
postal_code='11222', country='FR')
326329
BaseTestLive._user_legal_sca_payer = LegalUserSca(**user.save())
327330
return BaseTestLive._user_legal_sca_payer
328331

@@ -461,6 +464,9 @@ def get_john_sca_payer(recreate=False, terms=True):
461464
user.user_category = 'PAYER'
462465
user.phone_number = '+33611111111'
463466
user.phone_number_country = 'FR'
467+
user.address = Address(address_line_1='AddressLine1', address_line_2='AddressLine2',
468+
city='City', region='Region',
469+
postal_code='11222', country='FR')
464470
BaseTestLive._john_sca_payer = NaturalUserSca(**user.save())
465471
return BaseTestLive._john_sca_payer
466472

tests/test_users.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,6 @@ def test_Users_UpdateLegalSca(self):
801801

802802
self.assertEqual(changed_name, fetched.name)
803803

804-
@unittest.skip("can't be tested")
805804
def test_Users_categorizeNatural(self):
806805
user = BaseTestLive.get_john_sca_payer()
807806

@@ -835,7 +834,6 @@ def test_Users_enrollSca(self):
835834
enrollment_result = User.enroll_sca(user.id)
836835
self.assertIsNotNone(enrollment_result.pending_user_action.redirect_url)
837836

838-
@unittest.skip("can't be tested")
839837
def test_Users_categorizeLegal(self):
840838
user = BaseTestLive.get_user_legal_sca_payer()
841839

@@ -847,7 +845,12 @@ def test_Users_categorizeLegal(self):
847845
'legal_representative': {
848846
'Birthday': 188352000,
849847
'Nationality': 'FR',
850-
'CountryOfResidence': 'FR'
848+
'CountryOfResidence': 'FR',
849+
'FirstName': 'John SCA',
850+
'LastName': 'Doe SCA review',
851+
'Email': 'john.doe.sca@sample.org',
852+
'PhoneNumber': '',
853+
'PhoneNumberCountry': 'FR'
851854
},
852855
'headquarters_address': {
853856
'AddressLine1': 'AddressLine1',

0 commit comments

Comments
 (0)