* fix(unicode): Import unicode_literals in every file * fix(unicode): Test if safe_json_loads return unicode instead of bytes
17 lines
566 B
Python
17 lines
566 B
Python
from __future__ import unicode_literals
|
|
import unittest, frappe
|
|
from frappe.modules import patch_handler
|
|
|
|
class TestPatches(unittest.TestCase):
|
|
def test_patch_module_names(self):
|
|
frappe.flags.final_patches = []
|
|
frappe.flags.in_install = True
|
|
for patchmodule in patch_handler.get_all_patches():
|
|
if patchmodule.startswith("execute:"):
|
|
pass
|
|
else:
|
|
if patchmodule.startswith("finally:"):
|
|
patchmodule = patchmodule.split('finally:')[-1]
|
|
self.assertTrue(frappe.get_attr(patchmodule.split()[0] + ".execute"))
|
|
|
|
frappe.flags.in_install = False
|