brotherton-erpnext/erpnext/tests/test_regional.py
Charles-Henri Decultot b8c088edb7 Transaction Log for France (#12795)
* Regional overrides for France

* Addition of tests and documentation
2018-02-21 11:07:33 +05:30

17 lines
412 B
Python

import unittest, frappe, erpnext
@erpnext.allow_regional
def test_method():
return 'original'
class TestInit(unittest.TestCase):
def test_regional_overrides(self):
frappe.flags.country = 'India'
self.assertEqual(test_method(), 'overridden')
frappe.flags.country = 'Nepal'
self.assertEqual(test_method(), 'original')
frappe.flags.country = 'France'
self.assertEqual(test_method(), 'overridden')