2017-07-13 15:07:51 +05:30
|
|
|
import unittest, frappe, erpnext
|
|
|
|
|
2017-07-13 15:49:37 +05:30
|
|
|
@erpnext.allow_regional
|
2017-07-13 15:07:51 +05:30
|
|
|
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')
|