Rushabh Mehta | 8f2e21d | 2017-07-13 15:07:51 +0530 | [diff] [blame] | 1 | import unittest, frappe, erpnext |
| 2 | |
Rushabh Mehta | 393becc | 2017-07-13 15:49:37 +0530 | [diff] [blame] | 3 | @erpnext.allow_regional |
Rushabh Mehta | 8f2e21d | 2017-07-13 15:07:51 +0530 | [diff] [blame] | 4 | def test_method(): |
| 5 | return 'original' |
| 6 | |
| 7 | class TestInit(unittest.TestCase): |
| 8 | def test_regional_overrides(self): |
| 9 | frappe.flags.country = 'India' |
| 10 | self.assertEqual(test_method(), 'overridden') |
| 11 | |
| 12 | frappe.flags.country = 'Nepal' |
| 13 | self.assertEqual(test_method(), 'original') |