Ainsit.HnsErp.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
430 B

import unittest
import frappe
import 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 = 'Maldives'
self.assertEqual(test_method(), 'original')
frappe.flags.country = 'France'
self.assertEqual(test_method(), 'overridden')