Skip to content

Commit

Permalink
feat(python-sdk): fix python tests - add more assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianMiklaszewskiBldr committed Jan 29, 2024
1 parent bda1924 commit f112bb7
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions tests/test_authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,43 @@ def test_authorized(self):
result = self.client.sites.read_site()

assert isinstance(result, SiteResponse)

site = result.site
assert 'python-sdk' == site.subdomain
assert 4502 == site.id
assert 'Python SDK Env' == site.name
assert 'python-sdk' == site.subdomain
assert 'USD' == site.currency
assert True == site.test
assert 4502 == site.id
assert 722159 == site.seller_id
assert True == site.relationship_invoicing_enabled
assert False == site.customer_hierarchy_enabled
assert False == site.whopays_enabled
assert 'self-ungrouped' == site.whopays_default_payer
assert True == site.test
assert 'automatic' == site.default_payment_collection_method

allocation_settings = site.allocation_settings
assert 'true' == allocation_settings.accrue_charge
assert 'prorated' == allocation_settings.upgrade_charge
assert 'none' == allocation_settings.downgrade_credit

organization_address = site.organization_address
assert 'Asdf Street' == organization_address.street
assert '123/444' == organization_address.line_2
assert 'San Antonio' == organization_address.city
assert 'TX' == organization_address.state
assert '78015' == organization_address.zip
assert 'US' == organization_address.country
assert 'Developer Experience' == organization_address.name
assert '555 111 222' == organization_address.phone

tax_configuration = site.tax_configuration
assert 'custom' == tax_configuration.kind
assert 'shipping_then_billing' == tax_configuration.destination_address
assert False == tax_configuration.fully_configured

net_terms = site.net_terms
assert 0 == net_terms.default_net_terms
assert 0 == net_terms.automatic_net_terms
assert 0 == net_terms.remittance_net_terms
assert False == net_terms.net_terms_on_remittance_signups_enabled
assert False == net_terms.custom_net_terms_enabled

0 comments on commit f112bb7

Please sign in to comment.