mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 19:37:56 +00:00
* chore: Added isort to pre-commit config * chore: Sort imports with isort * chore: Remove imports with pycln * chore: Sort imports with isort * chore: Fix import issues * chore: Fix sider issues * chore: linting * chore: linting / sorting import from ecommerce refactor merge * ci: dont allow unused imports * chore: sort / clean ecommerce imports Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
24 lines
471 B
Python
24 lines
471 B
Python
from __future__ import unicode_literals
|
|
|
|
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')
|