refactor: Use IntegrationTestCase in multiple files

Signed-off-by: David <dgx.arnold@gmail.com>
This commit is contained in:
David
2024-10-08 01:52:47 +02:00
parent cd112795d3
commit 9024621231
21 changed files with 55 additions and 42 deletions

View File

@@ -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('Authorization Rule')
class TestAuthorizationRule(unittest.TestCase):
class TestAuthorizationRule(IntegrationTestCase):
pass

View File

@@ -1,11 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import json
import unittest
import frappe
from frappe import _
from frappe.tests import IntegrationTestCase
from frappe.utils import random_string
from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import (
@@ -18,7 +18,7 @@ test_dependencies = ["Fiscal Year"]
test_records = frappe.get_test_records("Company")
class TestCompany(unittest.TestCase):
class TestCompany(IntegrationTestCase):
def test_coa_based_on_existing_company(self):
company = frappe.new_doc("Company")
company.company_name = "COA from Existing Company"

View File

@@ -1,10 +1,10 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import unittest
from unittest import mock
import frappe
from frappe.tests import IntegrationTestCase
from frappe.utils import cint, flt
from erpnext.setup.utils import get_exchange_rate
@@ -80,7 +80,7 @@ def patched_requests_get(*args, **kwargs):
@mock.patch("requests.get", side_effect=patched_requests_get)
class TestCurrencyExchange(unittest.TestCase):
class TestCurrencyExchange(IntegrationTestCase):
def clear_cache(self):
cache = frappe.cache()
for date in test_exchange_values.keys():

View File

@@ -1,14 +1,14 @@
# 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
test_ignore = ["Leave Block List"]
class TestDepartment(unittest.TestCase):
class TestDepartment(IntegrationTestCase):
def test_remove_department_data(self):
doc = create_department("Test Department")
frappe.delete_doc("Department", doc.name)

View File

@@ -1,8 +1,9 @@
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import unittest
from frappe.tests import IntegrationTestCase
class TestDriver(unittest.TestCase):
class TestDriver(IntegrationTestCase):
pass

View File

@@ -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('Email Digest')
class TestEmailDigest(unittest.TestCase):
class TestEmailDigest(IntegrationTestCase):
pass