Beispiel #1
0
def test_shipping_get_ajax_label(shipping_zone):
    shipping_method = shipping_zone.shipping_methods.get()
    label = shipping_method.get_ajax_label()
    proper_label = '%(shipping_method)s %(price)s' % {
        'shipping_method': shipping_method,
        'price': format_money(shipping_method.price)}
    assert label == proper_label
Beispiel #2
0
def test_shipping_get_ajax_label(shipping_zone):
    shipping_method = shipping_zone.shipping_methods.get()
    label = shipping_method.get_ajax_label()
    proper_label = '%(shipping_method)s %(price)s' % {
        'shipping_method': shipping_method,
        'price': format_money(shipping_method.price)}
    assert label == proper_label
Beispiel #3
0
def test_shipping_get_ajax_label(shipping_zone):
    shipping_method = shipping_zone.shipping_methods.get()
    label = shipping_method.get_ajax_label()
    proper_label = "%(shipping_method)s %(price)s" % {
        "shipping_method": shipping_method,
        "price": format_money(shipping_method.price),
    }
    assert label == proper_label
Beispiel #4
0
def test_shipping_get_ajax_label(shipping_zone):
    shipping_method = shipping_zone.shipping_methods.get()
    label = shipping_method.get_ajax_label()
    proper_label = "%(shipping_method)s %(price)s" % {
        "shipping_method": shipping_method,
        "price": format_money(shipping_method.price),
    }
    assert label == proper_label
Beispiel #5
0
def test_shipping_get_ajax_label(shipping_method):
    method = shipping_method.price_per_country.get()
    label = method.get_ajax_label()
    proper_label = '%(shipping_method)s %(country_code_display)s %(price)s' % {
        'shipping_method': method.shipping_method,
        'country_code_display': method.get_country_code_display(),
        'price': format_money(method.price)}
    assert label == proper_label
Beispiel #6
0
def test_format_money():
    money = Money("123.99", "USD")
    assert format_money(money) == "$123.99"
Beispiel #7
0
def test_format_money():
    money = Money('123.99', 'USD')
    assert format_money(money) == '$123.99'
Beispiel #8
0
def test_format_money():
    money = Money("123.99", "USD")
    assert format_money(money) == "$123.99"
Beispiel #9
0
def test_format_money():
    money = Money('123.99', 'USD')
    assert format_money(money) == '$123.99'