def test_request_data_for_gateway_config_no_country(checkout, address, settings): # given merchant_account = "test_account" # when response_config = request_data_for_gateway_config(checkout, merchant_account) # then assert response_config == { "merchantAccount": merchant_account, "countryCode": settings.DEFAULT_COUNTRY, "channel": "web", "amount": {"currency": "USD", "value": "0"}, }
def test_request_data_for_gateway_config(checkout_with_item, address): # given checkout_with_item.billing_address = address merchant_account = "test_account" # when response_config = request_data_for_gateway_config( checkout_with_item, merchant_account ) # then assert response_config == { "merchantAccount": merchant_account, "countryCode": checkout_with_item.billing_address.country, "channel": "web", "amount": {"currency": "USD", "value": "3000"}, }