diff --git a/erpnext/controllers/tests/test_item_variant.py b/erpnext/controllers/tests/test_item_variant.py index b3633e6ff09..d0ccc519b6d 100644 --- a/erpnext/controllers/tests/test_item_variant.py +++ b/erpnext/controllers/tests/test_item_variant.py @@ -1,7 +1,6 @@ from __future__ import unicode_literals import json -import unittest import frappe from six import string_types @@ -11,9 +10,10 @@ from erpnext.stock.doctype.item.test_item import set_item_variant_settings from erpnext.stock.doctype.quality_inspection.test_quality_inspection import ( create_quality_inspection_parameter, ) +from erpnext.tests.utils import ERPNextTestCase -class TestItemVariant(unittest.TestCase): +class TestItemVariant(ERPNextTestCase): def test_tables_in_template_copied_to_variant(self): fields = [{'field_name': 'quality_inspection_template'}] set_item_variant_settings(fields) diff --git a/erpnext/controllers/tests/test_mapper.py b/erpnext/controllers/tests/test_mapper.py index 2d1ae43f074..c781d9298f5 100644 --- a/erpnext/controllers/tests/test_mapper.py +++ b/erpnext/controllers/tests/test_mapper.py @@ -1,7 +1,6 @@ from __future__ import unicode_literals import json -import unittest import frappe import frappe.utils @@ -9,8 +8,10 @@ from frappe.model import mapper from frappe.test_runner import make_test_records from frappe.utils import add_months, nowdate +from erpnext.tests.utils import ERPNextTestCase -class TestMapper(unittest.TestCase): + +class TestMapper(ERPNextTestCase): def test_map_docs(self): '''Test mapping of multiple source docs on a single target doc''' diff --git a/erpnext/controllers/tests/test_qty_based_taxes.py b/erpnext/controllers/tests/test_qty_based_taxes.py index 41673d1e6fb..7131922c3c5 100644 --- a/erpnext/controllers/tests/test_qty_based_taxes.py +++ b/erpnext/controllers/tests/test_qty_based_taxes.py @@ -1,15 +1,16 @@ from __future__ import print_function, unicode_literals -import unittest from uuid import uuid4 as _uuid4 import frappe +from erpnext.tests.utils import ERPNextTestCase + def uuid4(): return str(_uuid4()) -class TestTaxes(unittest.TestCase): +class TestTaxes(ERPNextTestCase): def setUp(self): self.company = frappe.get_doc({ 'doctype': 'Company', diff --git a/erpnext/controllers/tests/test_queries.py b/erpnext/controllers/tests/test_queries.py index 05541d16887..ebf188291db 100644 --- a/erpnext/controllers/tests/test_queries.py +++ b/erpnext/controllers/tests/test_queries.py @@ -1,7 +1,7 @@ -import unittest from functools import partial from erpnext.controllers import queries +from erpnext.tests.utils import ERPNextTestCase def add_default_params(func, doctype): @@ -10,7 +10,7 @@ def add_default_params(func, doctype): ) -class TestQueries(unittest.TestCase): +class TestQueries(ERPNextTestCase): # All tests are based on doctype/test_records.json