mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
refactor(test): make pos profile deterministic
This commit is contained in:
@@ -13,6 +13,7 @@ from erpnext.tests.utils import ERPNextTestSuite
|
|||||||
|
|
||||||
class TestPOSProfile(ERPNextTestSuite):
|
class TestPOSProfile(ERPNextTestSuite):
|
||||||
def test_pos_profile(self):
|
def test_pos_profile(self):
|
||||||
|
frappe.set_user("Administrator")
|
||||||
make_pos_profile()
|
make_pos_profile()
|
||||||
|
|
||||||
pos_profile = get_pos_profile("_Test Company") or {}
|
pos_profile = get_pos_profile("_Test Company") or {}
|
||||||
@@ -34,8 +35,6 @@ class TestPOSProfile(ERPNextTestSuite):
|
|||||||
self.assertEqual(len(items), products_count[0][0])
|
self.assertEqual(len(items), products_count[0][0])
|
||||||
self.assertEqual(len(customers), customers_count[0][0])
|
self.assertEqual(len(customers), customers_count[0][0])
|
||||||
|
|
||||||
frappe.db.sql("delete from `tabPOS Profile`")
|
|
||||||
|
|
||||||
def test_disabled_pos_profile_creation(self):
|
def test_disabled_pos_profile_creation(self):
|
||||||
make_pos_profile(name="_Test POS Profile 001", disabled=1)
|
make_pos_profile(name="_Test POS Profile 001", disabled=1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user