fix: remove redundant code
This commit is contained in:
parent
4a546942e4
commit
e0e1c15d76
1 changed files with 1 additions and 26 deletions
|
|
@ -22,29 +22,4 @@ class TestFormatter(unittest.TestCase):
|
|||
doc.currency = 'USD'
|
||||
self.assertEqual(format(100, df, doc), "$ 100.00")
|
||||
|
||||
frappe.db.set_default("currency", None)
|
||||
|
||||
def test_custom_currency_formatting(self):
|
||||
df = frappe._dict({
|
||||
'fieldname': 'amount',
|
||||
'fieldtype': 'Currency',
|
||||
'options': 'currency'
|
||||
})
|
||||
|
||||
doc = frappe._dict({
|
||||
'amount': 5
|
||||
})
|
||||
frappe.db.set_default("currency", 'INR')
|
||||
|
||||
# if currency field is not passed then default currency should be used.
|
||||
print("doc.currency")
|
||||
print(doc.currency)
|
||||
print("frappe.db.get_default('currency')")
|
||||
print(frappe.db.get_default("currency"))
|
||||
|
||||
self.assertEqual(format(100000, df, doc, format="#,###.##"), '₹ 100,000.00')
|
||||
|
||||
doc.currency = 'USD'
|
||||
self.assertEqual(format(100000, df, doc, format="#,###.##"), "$ 100,000.00")
|
||||
|
||||
frappe.db.set_default("currency", None)
|
||||
frappe.db.set_default("currency", None)
|
||||
Loading…
Add table
Reference in a new issue