mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 07:08:24 +00:00
refactor: Use IntegrationTestCase in multiple files
Signed-off-by: David <dgx.arnold@gmail.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
import frappe.utils
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
import erpnext
|
||||
from erpnext.setup.doctype.employee.employee import InactiveEmployeeStatusError
|
||||
@@ -12,7 +12,7 @@ from erpnext.setup.doctype.employee.employee import InactiveEmployeeStatusError
|
||||
test_records = frappe.get_test_records("Employee")
|
||||
|
||||
|
||||
class TestEmployee(unittest.TestCase):
|
||||
class TestEmployee(IntegrationTestCase):
|
||||
def test_employee_status_left(self):
|
||||
employee1 = make_employee("test_employee_1@company.com")
|
||||
employee2 = make_employee("test_employee_2@company.com")
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
from erpnext.setup.doctype.employee.test_employee import make_employee
|
||||
|
||||
|
||||
class TestEmployeeGroup(unittest.TestCase):
|
||||
class TestEmployeeGroup(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestGlobalDefaults(unittest.TestCase):
|
||||
|
||||
class TestGlobalDefaults(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import unittest
|
||||
from contextlib import contextmanager
|
||||
from datetime import date, timedelta
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import getdate
|
||||
|
||||
from erpnext.setup.doctype.holiday_list.holiday_list import local_country_name
|
||||
|
||||
|
||||
class TestHolidayList(unittest.TestCase):
|
||||
class TestHolidayList(IntegrationTestCase):
|
||||
def test_holiday_list(self):
|
||||
today_date = getdate()
|
||||
test_holiday_dates = [today_date - timedelta(days=5), today_date - timedelta(days=4)]
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils.nestedset import (
|
||||
NestedSetChildExistsError,
|
||||
NestedSetInvalidMergeError,
|
||||
@@ -17,7 +16,7 @@ from frappe.utils.nestedset import (
|
||||
test_records = frappe.get_test_records("Item Group")
|
||||
|
||||
|
||||
class TestItem(unittest.TestCase):
|
||||
class TestItem(IntegrationTestCase):
|
||||
def test_basic_tree(self, records=None):
|
||||
min_lft = 1
|
||||
max_rgt = frappe.db.sql("select max(rgt) from `tabItem Group`")[0][0]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
# test_records = frappe.get_test_records('Party Type')
|
||||
|
||||
|
||||
class TestPartyType(unittest.TestCase):
|
||||
class TestPartyType(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestUOMConversionFactor(unittest.TestCase):
|
||||
|
||||
class TestUOMConversionFactor(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import random_string
|
||||
|
||||
# test_records = frappe.get_test_records('Vehicle')
|
||||
|
||||
|
||||
class TestVehicle(unittest.TestCase):
|
||||
class TestVehicle(IntegrationTestCase):
|
||||
def test_make_vehicle(self):
|
||||
vehicle = frappe.get_doc(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user