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')
def test_parse_currency_solitude(self, urlopen): res = views._parse_currency({'amount': '1.00', 'currency': 'USD'}) eq_(res['amount'], Decimal('1.00'))
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")
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')