brotherton-erpnext/erpnext/tests/test_regional.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
349 B
Python
Raw Normal View History

import unittest
import frappe
import erpnext
2017-07-13 10:19:37 +00:00
@erpnext.allow_regional
def test_method():
return "original"
2022-03-28 13:22:46 +00:00
class TestInit(unittest.TestCase):
def test_regional_overrides(self):
2018-03-09 07:41:00 +00:00
frappe.flags.country = "Maldives"
self.assertEqual(test_method(), "original")
frappe.flags.country = "France"
2018-03-09 07:41:00 +00:00
self.assertEqual(test_method(), "overridden")