diff --git a/tests/conftest.py b/tests/conftest.py index 9aea748e..ec3cf9e7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,7 +22,6 @@ BASIC_AUTH_USERNAME = os.getenv("BASIC_AUTH_USERNAME") BASIC_AUTH_PASSWORD = os.getenv("BASIC_AUTH_PASSWORD") -DOMAIN = os.getenv("DOMAIN") SUBDOMAIN = os.getenv("SUBDOMAIN") @@ -42,7 +41,6 @@ def clean_custom_fields(client: AdvancedBillingClient): def client() -> AdvancedBillingClient: client = AdvancedBillingClient( subdomain=SUBDOMAIN, - domain=DOMAIN, basic_auth_credentials=BasicAuthCredentials( username=BASIC_AUTH_USERNAME, password=BASIC_AUTH_PASSWORD @@ -50,7 +48,7 @@ def client() -> AdvancedBillingClient: ) clean_custom_fields(client) - client.sites.clear_site() + #client.sites.clear_site() sleep(10) # Wait for site to be cleared as it takes some time yield client @@ -60,7 +58,6 @@ def client() -> AdvancedBillingClient: def unauthorized_client() -> AdvancedBillingClient: return AdvancedBillingClient( subdomain=SUBDOMAIN, - domain=DOMAIN, basic_auth_credentials=BasicAuthCredentials( username="thisiswrongapitokenthisiswrongapitokenV8", password=BASIC_AUTH_PASSWORD diff --git a/tests/test_invoices.py b/tests/test_invoices.py index 22c44bd1..9d941911 100644 --- a/tests/test_invoices.py +++ b/tests/test_invoices.py @@ -18,7 +18,7 @@ from advancedbilling.models.coupon import Coupon from advancedbilling.models.create_customer_request import CreateCustomerRequest from advancedbilling.models.create_invoice_request import CreateInvoiceRequest -from advancedbilling.models.create_or_update_coupon import CreateOrUpdateCoupon +from advancedbilling.models.coupon_request import CouponRequest from advancedbilling.models.create_or_update_product_request import ( CreateOrUpdateProductRequest, ) @@ -75,7 +75,7 @@ def test_create_invoice_given_subscription_then_return_correct_invoice( ).payment_profile coupon: Coupon = coupons_controller.create_coupon( - product_family.id, CreateOrUpdateCoupon(InitCases.get_coupon_data()) + product_family.id, CouponRequest(InitCases.get_coupon_data()) ).coupon subscription: Subscription = subscriptions_controller.create_subscription(