Add flag testmode_supported to sales channels (#1455)

* Add testmode-support-flag to SalesChannels

* Make saleschannels/testmode-warnings even more dangerous!

* Add warning for payment-methods that do support testmode but are being used in a non-testmode order caused by a saleschannel in a testmode-shop.

* Remove redundant testmode_supported-flag for WebshopSalesChannel

* Raise error on API when sales_channel does not support testmode

* Tests

* Fix style issue after merge
This commit is contained in:
Martin Gross
2019-10-21 10:07:02 +02:00
committed by Raphael Michel
parent e8a2f7e349
commit 2b18621c76
14 changed files with 171 additions and 24 deletions

View File

@@ -35,6 +35,13 @@ class SalesChannel:
"""
return "circle"
@property
def testmode_supported(self) -> bool:
"""
Indication, if a saleschannels supports test mode orders
"""
return True
def get_all_sales_channels():
global _ALL_CHANNELS