Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
cleanup tests directory
Damian Wysocki8acb7b239a0f
diff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[False-24.39-30.00-True].yaml b/tests/plugins/cassettes/test_calculate_checkout_line_total[False-24.39-30.00-True].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[False-24.39-30.00-True].yamlrename to tests/plugins/cassettes/test_calculate_checkout_line_total[False-24.39-30.00-True].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[False-30.00-36.90-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_line_total[False-30.00-36.90-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[False-30.00-36.90-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_line_total[False-30.00-36.90-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[True-12.20-15.00-True].yaml b/tests/plugins/cassettes/test_calculate_checkout_line_total[True-12.20-15.00-True].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[True-12.20-15.00-True].yamlrename to tests/plugins/cassettes/test_calculate_checkout_line_total[True-12.20-15.00-True].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[True-15.00-18.45-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_line_total[True-15.00-18.45-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_line_total[True-15.00-18.45-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_line_total[True-15.00-18.45-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_shipping.yaml b/tests/plugins/cassettes/test_calculate_checkout_shipping.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_shipping.yamlrename to tests/plugins/cassettes/test_calculate_checkout_shipping.yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[False-40.65-50.00-True].yaml b/tests/plugins/cassettes/test_calculate_checkout_subtotal[False-40.65-50.00-True].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[False-40.65-50.00-True].yamlrename to tests/plugins/cassettes/test_calculate_checkout_subtotal[False-40.65-50.00-True].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[False-50.00-61.50-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_subtotal[False-50.00-61.50-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[False-50.00-61.50-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_subtotal[False-50.00-61.50-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[True-20.33-25.00-True].yaml b/tests/plugins/cassettes/test_calculate_checkout_subtotal[True-20.33-25.00-True].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[True-20.33-25.00-True].yamlrename to tests/plugins/cassettes/test_calculate_checkout_subtotal[True-20.33-25.00-True].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[True-25.00-30.75-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_subtotal[True-25.00-30.75-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_subtotal[True-25.00-30.75-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_subtotal[True-25.00-30.75-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-29.52-37.00-3.0-True].yaml b/tests/plugins/cassettes/test_calculate_checkout_total[False-29.52-37.00-3.0-True].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-29.52-37.00-3.0-True].yamlrename to tests/plugins/cassettes/test_calculate_checkout_total[False-29.52-37.00-3.0-True].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-37.00-37.00-3.0-True].yaml b/tests/plugins/cassettes/test_calculate_checkout_total[False-37.00-37.00-3.0-True].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-37.00-37.00-3.0-True].yamlrename to tests/plugins/cassettes/test_calculate_checkout_total[False-37.00-37.00-3.0-True].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-40.00-40.00-0.0-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_total[False-40.00-40.00-0.0-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-40.00-40.00-0.0-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_total[False-40.00-40.00-0.0-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-40.00-49.20-0.0-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_total[False-40.00-49.20-0.0-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_total[False-40.00-49.20-0.0-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_total[False-40.00-49.20-0.0-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_total[True-20.00-20.00-5.0-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_total[True-20.00-20.00-5.0-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_total[True-20.00-20.00-5.0-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_total[True-20.00-20.00-5.0-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_total[True-20.00-25.75-5.0-False].yaml b/tests/plugins/cassettes/test_calculate_checkout_total[True-20.00-25.75-5.0-False].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_total[True-20.00-25.75-5.0-False].yamlrename to tests/plugins/cassettes/test_calculate_checkout_total[True-20.00-25.75-5.0-False].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_checkout_total[True-20.33-25.00-0.0-True].yaml b/tests/plugins/cassettes/test_calculate_checkout_total[True-20.33-25.00-0.0-True].yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_checkout_total[True-20.33-25.00-0.0-True].yamlrename to tests/plugins/cassettes/test_calculate_checkout_total[True-20.33-25.00-0.0-True].yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_order_line_unit.yaml b/tests/plugins/cassettes/test_calculate_order_line_unit.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_order_line_unit.yamlrename to tests/plugins/cassettes/test_calculate_order_line_unit.yamldiff --git a/tests/plugins/plugins/cassettes/test_calculate_order_shipping.yaml b/tests/plugins/cassettes/test_calculate_order_shipping.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_calculate_order_shipping.yamlrename to tests/plugins/cassettes/test_calculate_order_shipping.yamldiff --git a/tests/plugins/plugins/cassettes/test_get_cached_tax_codes_or_fetch.yaml b/tests/plugins/cassettes/test_get_cached_tax_codes_or_fetch.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_get_cached_tax_codes_or_fetch.yamlrename to tests/plugins/cassettes/test_get_cached_tax_codes_or_fetch.yamldiff --git a/tests/plugins/plugins/cassettes/test_get_cached_tax_codes_or_fetch_wrong_response.yaml b/tests/plugins/cassettes/test_get_cached_tax_codes_or_fetch_wrong_response.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_get_cached_tax_codes_or_fetch_wrong_response.yamlrename to tests/plugins/cassettes/test_get_cached_tax_codes_or_fetch_wrong_response.yamldiff --git a/tests/plugins/plugins/cassettes/test_plugin_uses_configuration_from_db.yaml b/tests/plugins/cassettes/test_plugin_uses_configuration_from_db.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_plugin_uses_configuration_from_db.yamlrename to tests/plugins/cassettes/test_plugin_uses_configuration_from_db.yamldiff --git a/tests/plugins/plugins/cassettes/test_preprocess_order_creation.yaml b/tests/plugins/cassettes/test_preprocess_order_creation.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_preprocess_order_creation.yamlrename to tests/plugins/cassettes/test_preprocess_order_creation.yamldiff --git a/tests/plugins/plugins/cassettes/test_preprocess_order_creation_wrong_data.yaml b/tests/plugins/cassettes/test_preprocess_order_creation_wrong_data.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_preprocess_order_creation_wrong_data.yamlrename to tests/plugins/cassettes/test_preprocess_order_creation_wrong_data.yamldiff --git a/tests/plugins/plugins/cassettes/test_trigger_webhooks_for_event.yaml b/tests/plugins/cassettes/test_trigger_webhooks_for_event.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_trigger_webhooks_for_event.yamlrename to tests/plugins/cassettes/test_trigger_webhooks_for_event.yamldiff --git a/tests/plugins/plugins/cassettes/test_trigger_webhooks_for_event_with_secret_key.yaml b/tests/plugins/cassettes/test_trigger_webhooks_for_event_with_secret_key.yamlsimilarity index 100%rename from tests/plugins/plugins/cassettes/test_trigger_webhooks_for_event_with_secret_key.yamlrename to tests/plugins/cassettes/test_trigger_webhooks_for_event_with_secret_key.yamldiff --git a/tests/plugins/conftest.py b/tests/plugins/conftest.pyindex ce48d9a722..b2ab8de1fa 100644--- a/tests/plugins/conftest.py+++ b/tests/plugins/conftest.py@@ -1,4 +1,6 @@import pytest+from django_prices_vatlayer.models import VAT+from django_prices_vatlayer.utils import get_tax_for_ratefrom saleor.plugins.base_plugin import ConfigurationTypeFieldfrom saleor.plugins.models import PluginConfiguration@@ -38,3 +40,66 @@ def new_config():@pytest.fixturedef new_config_structure():return {"type": ConfigurationTypeField.STRING, "help_text": "foo", "label": "foo"}+++def tax_rates():+ return {+ "standard_rate": 23,+ "reduced_rates": {+ "pharmaceuticals": 8,+ "medical": 8,+ "passenger transport": 8,+ "newspapers": 8,+ "hotels": 8,+ "restaurants": 8,+ "admission to cultural events": 8,+ "admission to sporting events": 8,+ "admission to entertainment events": 8,+ "foodstuffs": 5,+ },+ }+++def taxes(tax_rates):+ taxes = {+ "standard": {+ "value": tax_rates["standard_rate"],+ "tax": get_tax_for_rate(tax_rates),+ }+ }+ if tax_rates["reduced_rates"]:+ taxes.update(+ {+ rate: {+ "value": tax_rates["reduced_rates"][rate],+ "tax": get_tax_for_rate(tax_rates, rate),+ }+ for rate in tax_rates["reduced_rates"]+ }+ )+ return taxes+++def vatlayer(db, settings, tax_rates, taxes):+ settings.VATLAYER_ACCESS_KEY = "enablevatlayer"+ settings.PLUGINS = ["saleor.plugins.vatlayer.plugin.VatlayerPlugin"]+ VAT.objects.create(country_code="PL", data=tax_rates)++ tax_rates_2 = {+ "standard_rate": 19,+ "reduced_rates": {+ "admission to cultural events": 7,+ "admission to entertainment events": 7,+ "books": 7,+ "foodstuffs": 7,+ "hotels": 7,+ "medical": 7,+ "newspapers": 7,+ "passenger transport": 7,+ },+ }+ VAT.objects.create(country_code="DE", data=tax_rates_2)+ return taxesdiff --git a/tests/plugins/plugins/__init__.py b/tests/plugins/plugins/__init__.pydeleted file mode 100644index e69de29bb2..0000000000diff --git a/tests/plugins/plugins/conftest.py b/tests/plugins/plugins/conftest.pydeleted file mode 100644index 677cb79003..0000000000--- a/tests/plugins/plugins/conftest.py+++ /dev/null@@ -1,66 +0,0 @@-import pytest-from django_prices_vatlayer.models import VAT-from django_prices_vatlayer.utils import get_tax_for_rate---def tax_rates():- return {- "standard_rate": 23,- "reduced_rates": {- "pharmaceuticals": 8,- "medical": 8,- "passenger transport": 8,- "newspapers": 8,- "hotels": 8,- "restaurants": 8,- "admission to cultural events": 8,- "admission to sporting events": 8,- "admission to entertainment events": 8,- "foodstuffs": 5,- },- }---def taxes(tax_rates):- taxes = {- "standard": {- "value": tax_rates["standard_rate"],- "tax": get_tax_for_rate(tax_rates),- }- }- if tax_rates["reduced_rates"]:- taxes.update(- {- rate: {- "value": tax_rates["reduced_rates"][rate],- "tax": get_tax_for_rate(tax_rates, rate),- }- for rate in tax_rates["reduced_rates"]- }- )- return taxes---def vatlayer(db, settings, tax_rates, taxes):- settings.VATLAYER_ACCESS_KEY = "enablevatlayer"- settings.PLUGINS = ["saleor.plugins.vatlayer.plugin.VatlayerPlugin"]- VAT.objects.create(country_code="PL", data=tax_rates)-- tax_rates_2 = {- "standard_rate": 19,- "reduced_rates": {- "admission to cultural events": 7,- "admission to entertainment events": 7,- "books": 7,- "foodstuffs": 7,- "hotels": 7,- "medical": 7,- "newspapers": 7,- "passenger transport": 7,- },- }- VAT.objects.create(country_code="DE", data=tax_rates_2)- return taxesdiff --git a/tests/plugins/plugins/test_avatax.py b/tests/plugins/test_avatax.pysimilarity index 100%rename from tests/plugins/plugins/test_avatax.pyrename to tests/plugins/test_avatax.pydiff --git a/tests/plugins/plugins/test_plugins.py b/tests/plugins/test_plugins.pysimilarity index 100%rename from tests/plugins/plugins/test_plugins.pyrename to tests/plugins/test_plugins.pydiff --git a/tests/plugins/plugins/test_vatlayer.py b/tests/plugins/test_vatlayer.pysimilarity index 100%rename from tests/plugins/plugins/test_vatlayer.pyrename to tests/plugins/test_vatlayer.pydiff --git a/tests/plugins/plugins/test_webhook.py b/tests/plugins/test_webhook.pysimilarity index 100%rename from tests/plugins/plugins/test_webhook.pyrename to tests/plugins/test_webhook.py