|
@@ -169,6 +169,13 @@ def get_discount_b():
|
|
|
amount = get_sum_b(),
|
|
|
)
|
|
|
|
|
|
+def get_discount_c():
|
|
|
+ return finoex.Discount(
|
|
|
+ amount = get_sum_b(),
|
|
|
+ code = 'DISCΓ',
|
|
|
+ name = u'discount c',
|
|
|
+ )
|
|
|
+
|
|
|
def get_order_a(items = True, discounts = True):
|
|
|
order = finoex.Order(
|
|
|
platform = u'platformπ',
|
|
@@ -247,6 +254,11 @@ def yaml_diff(a, b):
|
|
|
[finoex.Distance(1.34, u'μm'), u"!distance '1.34 μm'\n"],
|
|
|
[get_discount_a(), u"!discount\namount: !sum '1.23 EUR'\nname: discount a\n"],
|
|
|
[get_discount_b(), u"!discount\namount: !sum '20.45 EUR'\nname: discount β\n"],
|
|
|
+ [get_discount_c(), u"""!discount
|
|
|
+amount: !sum '20.45 EUR'
|
|
|
+code: DISCΓ
|
|
|
+name: discount c
|
|
|
+"""],
|
|
|
[get_figure_a(), u"!figure '12.3 km'\n"],
|
|
|
[get_figure_b(), u"!figure '12300 米'\n"],
|
|
|
[get_item_a(), u"!item\nname: item a\nprice_brutto: !sum '1.23 EUR'\n"],
|
|
@@ -415,6 +427,11 @@ def test_to_yaml(source_object, expected_yaml):
|
|
|
[finoex.Distance(1.34, u'μm'), u"!distance '1.34 μm'"],
|
|
|
[get_discount_a(), u"!discount\nname: discount a\namount: !sum '1.23 EUR'\n"],
|
|
|
[get_discount_b(), u"!discount\nname: discount β\namount: !sum '20.45 EUR'\n"],
|
|
|
+ [get_discount_c(), u"""!discount
|
|
|
+amount: !sum 20.45 EUR
|
|
|
+name: discount c
|
|
|
+code: DISCΓ
|
|
|
+"""],
|
|
|
[get_figure_a(), '!figure\nunit: km\nvalue: 12.3\n'],
|
|
|
[get_figure_a(), u'!figure\nunit: km\nvalue: 12.3\n'],
|
|
|
[get_figure_b(), '!figure\nunit: 米\nvalue: 12300\n'],
|