Example #1
0
 def test_parse_currency(self, urlopen):
     res = views._parse_currency(sample_refund['transaction[0].amount'])
     eq_(res['amount'], Decimal('1.00'))
     eq_(res['currency'], 'USD')
Example #2
0
 def test_parse_currency_solitude(self, urlopen):
     res = views._parse_currency({'amount': '1.00', 'currency': 'USD'})
     eq_(res['amount'], Decimal('1.00'))
Example #3
0
 def test_parse_currency(self, urlopen):
     res = views._parse_currency(sample_refund["transaction[0].amount"])
     eq_(res["amount"], Decimal("1.00"))
     eq_(res["currency"], "USD")
Example #4
0
 def test_parse_currency_solitude(self, urlopen):
     res = views._parse_currency({'amount': '1.00', 'currency': 'USD'})
     eq_(res['amount'], Decimal('1.00'))
Example #5
0
 def test_parse_currency(self, urlopen):
     res = views._parse_currency(sample_refund['transaction[0].amount'])
     eq_(res['amount'], Decimal('1.00'))
     eq_(res['currency'], 'USD')
Example #6
0
 def test_parse_currency(self, urlopen):
     # TODO(andym): flesh this out and conflate with ashort code.
     res = views._parse_currency(sample_refund['transaction[0].amount'])
     eq_(res['amount'], Decimal('0.01'))
     eq_(res['currency'], 'USD')
Example #7
0
 def test_parse_currency(self, urlopen):
     # TODO(andym): flesh this out and conflate with ashort code.
     res = views._parse_currency(sample_refund['transaction[0].amount'])
     eq_(res['amount'], Decimal('0.01'))
     eq_(res['currency'], 'USD')