def test_Users_CreateLegal_PassesIfRequiredPropsProvided(self):
        user = UserLegal()
        user.Name = "SomeOtherSampleOrg"
        user.LegalPersonType = "BUSINESS"
        user.Email = "*****@*****.**"
        user.LegalPersonType = "BUSINESS"
        user.LegalRepresentativeFirstName = 'Piter'
        user.LegalRepresentativeLastName = 'Doe'
        user.LegalRepresentativeBirthday = int(time.mktime((1979, 11, 21, 0,0,0, -1, -1, -1)))
        user.LegalRepresentativeNationality = 'FR'
        user.LegalRepresentativeCountryOfResidence = 'FR'
        ret = self.sdk.users.Create(user)

        self.assertTrue(int(ret.Id) > 0, "Created successfully after required props set")
        self.assertEqualInputProps(user, ret)
Beispiel #2
0
 def _build(self):
     mangopay_user = UserLegal()
     mangopay_user.Email = self.generic_business_email
     mangopay_user.Name = self.business_name
     mangopay_user.LegalPersonType = USER_TYPE_CHOICES_DICT[self.type]
     mangopay_user.HeadquartersAddress = self.headquaters_address
     mangopay_user.LegalRepresentativeFirstName = self.first_name
     mangopay_user.LegalRepresentativeLastName = self.last_name
     mangopay_user.LegalRepresentativeAddress = self.address
     mangopay_user.LegalRepresentativeEmail = self.email
     mangopay_user.LegalRepresentativeBirthday = self._birthday_fmt()
     mangopay_user.LegalRepresentativeNationality = self.nationality.code
     mangopay_user.LegalRepresentativeCountryOfResidence =\
         self.country_of_residence.code
     mangopay_user.Id = self.mangopay_id
     return mangopay_user
Beispiel #3
0
 def _build(self):
     mangopay_user = UserLegal()
     mangopay_user.Email = self.generic_business_email
     mangopay_user.Name = self.business_name
     mangopay_user.LegalPersonType = USER_TYPE_CHOICES_DICT[self.type]
     mangopay_user.HeadquartersAddress = self.headquaters_address
     mangopay_user.LegalRepresentativeFirstName = self.first_name
     mangopay_user.LegalRepresentativeLastName = self.last_name
     mangopay_user.LegalRepresentativeAddress = self.address
     mangopay_user.LegalRepresentativeEmail = self.email
     mangopay_user.LegalRepresentativeBirthday = self._birthday_fmt()
     mangopay_user.LegalRepresentativeNationality = self.nationality.code
     mangopay_user.LegalRepresentativeCountryOfResidence =\
         self.country_of_residence.code
     mangopay_user.Id = self.mangopay_id
     return mangopay_user
    def test_Users_CreateLegal_PassesIfRequiredPropsProvided(self):
        user = UserLegal()
        user.Name = "SomeOtherSampleOrg"
        user.LegalPersonType = "BUSINESS"
        user.Email = "*****@*****.**"
        user.LegalPersonType = "BUSINESS"
        user.LegalRepresentativeFirstName = 'Piter'
        user.LegalRepresentativeLastName = 'Doe'
        user.LegalRepresentativeBirthday = int(
            time.mktime((1979, 11, 21, 0, 0, 0, -1, -1, -1)))
        user.LegalRepresentativeNationality = 'FR'
        user.LegalRepresentativeCountryOfResidence = 'FR'
        ret = self.sdk.users.Create(user)

        self.assertTrue(
            int(ret.Id) > 0, "Created successfully after required props set")
        self.assertEqualInputProps(user, ret)
Beispiel #5
0
	def create_startup(self, dj_startup, dj_user):
		return self.sdk.users.GetAll()[4] #FIXME
		user = self.get_user(dj_user)
		startup = UserLegal()
		startup.Name = "MartixSampleOrg"
		startup.Email = "*****@*****.**"
		startup.LegalPersonType = "BUSINESS"
		startup.HeadquartersAddress = "Some Address"
		startup.LegalRepresentativeFirstName = user.FirstName
		startup.LegalRepresentativeLastName = user.LastName
		startup.LegalRepresentativeAddress = user.Address
		startup.LegalRepresentativeEmail = user.Email
		startup.LegalRepresentativeBirthday = user.Birthday
		startup.LegalRepresentativeNationality = user.Nationality
		startup.LegalRepresentativeCountryOfResidence = user.CountryOfResidence
		self._matrix = self.sdk.users.Create(startup)
		self.assertEqualInputProps(self._matrix, startup, True)
Beispiel #6
0
 def getMatrix(self):
     """Creates TestBase._matrix (test legal user) if not created yet"""
     if (self._matrix == None):
         john = self.getJohn()
         user = UserLegal()
         user.Name = "MartixSampleOrg"
         user.Email = "*****@*****.**"
         user.LegalPersonType = "BUSINESS"
         user.HeadquartersAddress = "Some Address"
         user.LegalRepresentativeFirstName = john.FirstName
         user.LegalRepresentativeLastName = john.LastName
         user.LegalRepresentativeAddress = john.Address
         user.LegalRepresentativeEmail = john.Email
         user.LegalRepresentativeBirthday = john.Birthday
         user.LegalRepresentativeNationality = john.Nationality
         user.LegalRepresentativeCountryOfResidence = john.CountryOfResidence
         self._matrix = self.sdk.users.Create(user)
         self.assertEqualInputProps(self._matrix, user, True)
     return self._matrix
 def getMatrix(self):
     """Creates TestBase._matrix (test legal user) if not created yet"""
     if (self._matrix == None):
         john = self.getJohn()
         user = UserLegal()
         user.Name = "MartixSampleOrg"
         user.Email = "*****@*****.**"
         user.LegalPersonType = "BUSINESS"
         user.HeadquartersAddress = self.getNewAddress()
         user.LegalRepresentativeFirstName = john.FirstName
         user.LegalRepresentativeLastName = john.LastName
         user.LegalRepresentativeAddress = john.Address
         user.LegalRepresentativeEmail = john.Email
         user.LegalRepresentativeBirthday = john.Birthday
         user.LegalRepresentativeNationality = john.Nationality
         user.LegalRepresentativeCountryOfResidence = john.CountryOfResidence
         self._matrix = self.sdk.users.Create(user)
         self.assertEqualInputProps(self._matrix, user, True)
     return self._matrix