def test_price_from_string_with_ascii_encoded(self):
     currency = Currency(
         'edw',
         places=2,
         pre_symbol=u'\xa3',
         post_symbol=None,
     )
     price = currency.price_as_string(13.1)
     assert price == six.text_type(u'\xa313.10')
Beispiel #2
0
 def test_price_from_string_with_ascii_encoded(self):
     currency = Currency(
         'edw',
         places=2,
         pre_symbol=u'\xa3',
         post_symbol=None,
     )
     price = currency.price_as_string(13.1)
     assert price == six.text_type(u'\xa313.10')
    def test_price_from_string_with_pre_symbol(self):

        currency = Currency(
            'fjd',
            places=2,
            pre_symbol='$',
            post_symbol=None,
        )

        price = currency.price_as_string(13.1)
        assert price == '$13.10'
    def test_price_from_string_with_post_symbol(self):

        currency = Currency(
            'bhd',
            places=3,
            pre_symbol=None,
            post_symbol='BD',
        )

        price = currency.price_as_string(13.1)
        assert price == '13.100BD'
Beispiel #5
0
    def test_price_from_string_with_pre_symbol(self):

        currency = Currency(
            'fjd',
            places=2,
            pre_symbol='$',
            post_symbol=None,
        )

        price = currency.price_as_string(13.1)
        assert price == '$13.10'
Beispiel #6
0
    def test_price_from_string_with_post_symbol(self):

        currency = Currency(
            'bhd',
            places=3,
            pre_symbol=None,
            post_symbol='BD',
        )

        price = currency.price_as_string(13.1)
        assert price == '13.100BD'