def test_0010_add_shipping_address(self):
        # Modifies the shipping address for a cart.

        shipping_address = Address()
        shipping_address.firstName = "Лев"
        shipping_address.lastName = "Толстой"
        shipping_address.street = "Pellavatehtaankatu 19"
        shipping_address.zipCode = "33210"
        shipping_address.city = "Tampere"
        shipping_address.country = "FI"
        shipping_address.emailAddress = "*****@*****.**"
        shipping_address.gender = "MALE"
        shipping_address.jobTitle = "writer"

        # set credentials of the cart
        self.params = self.add_cart_credential(self.params)
        self.params["object"] = shipping_address

        response = self.client.update_shipping_address(self.params)
        self.assertEqual(isinstance(response, dict), True)
    def test_0001_simple_correct_inputs(self):
        address = Address()
        address.company = "Company"
        address.salutation = "Mr"
        address.title = "Agent"
        address.firstName = "James"
        address.lastName = "Körri"
        address.street = "Finlaysoninkuja 19"
        address.streetDetails = ""
        address.zipCode = "33210"
        address.city = "TAMPERE"
        address.state = "Pirkanmaa"
        address.country = "Finland"
        address.vatId = "vat_01"
        address.birthday = "04.04.2014"
        address.emailAddress = "*****@*****.**"
        address.addressExtension = "C 2"
        address.bankAccountHolder = "James Körri"
        address.bankAccountNumber = "123456-789"
        address.bankName = "Big Bank"
        address.bankSortCode = "BB"
        address.businessEmailAddress = "*****@*****.**"
        address.businessPhoneNumber = "+358441111111"
        address.department = "IT"
        address.displayName = "James Körri"
        address.doorCode = "0000"
        address.faxNumber = "+35845000000"
        address.fiscalCode = "000000-000"
        address.gender = "MALE"
        address.jobTitle = "Secret Agent"
        address.middleName = "Kalle"
        address.mobilePhoneNumber = "+35844000000000"
        address.phoneNumber = "+3584413579"
        address.privateEmailAddress = "*****@*****.**"
        address.privatePhoneNumber = "+358441234567"
        address.websiteUrl = "http://websites.invalid"

        right_answer = {
            'company': 'Company',
            'salutation': 'Mr',
            'title': 'Agent',
            'firstName': 'James',
            'lastName': 'Körri',
            'street': 'Finlaysoninkuja 19',
            'streetDetails': '',
            'zipCode': '33210',
            'city': 'TAMPERE',
            'state': 'Pirkanmaa',
            'country': 'Finland',
            'vatId': 'vat_01',
            'birthday': '04.04.2014',
            'emailAddress': '*****@*****.**',
            'addressExtension': 'C 2',
            'bankAccountHolder': 'James Körri',
            'bankAccountNumber': '123456-789',
            'bankName': 'Big Bank',
            'bankSortCode': 'BB',
            'businessEmailAddress': '*****@*****.**',
            'businessPhoneNumber': '+358441111111',
            'department': 'IT',
            'displayName': 'James Körri',
            'doorCode': '0000',
            'faxNumber': '+35845000000',
            'fiscalCode': '000000-000',
            'gender': 'MALE',
            'jobTitle': 'Secret Agent',
            'middleName': 'Kalle',
            'mobilePhoneNumber': '+35844000000000',
            'phoneNumber': '+3584413579',
            'privateEmailAddress': '*****@*****.**',
            'privatePhoneNumber': '+358441234567',
            'websiteUrl': 'http://websites.invalid'
        }

        self.assertEqual(address.get_dict(), right_answer)