brotherton-erpnext/erpnext/tests/test_regional.py

18 lines
455 B
Python
Raw Normal View History

from __future__ import unicode_literals
import unittest, frappe, erpnext
2017-07-13 10:19:37 +00:00
@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')
2018-03-09 07:41:00 +00:00
frappe.flags.country = 'Maldives'
self.assertEqual(test_method(), 'original')
frappe.flags.country = 'France'
self.assertEqual(test_method(), 'overridden')