diff --git a/india_compliance/gst_india/doctype/bill_of_entry/test_bill_of_entry.py b/india_compliance/gst_india/doctype/bill_of_entry/test_bill_of_entry.py index 2fb013dfb4..cc722f0615 100644 --- a/india_compliance/gst_india/doctype/bill_of_entry/test_bill_of_entry.py +++ b/india_compliance/gst_india/doctype/bill_of_entry/test_bill_of_entry.py @@ -10,7 +10,7 @@ make_journal_entry_for_payment, make_landed_cost_voucher, ) -from india_compliance.gst_india.utils.tests import create_transaction +from india_compliance.gst_india.utils.tests import create_purchase_invoice class TestBillofEntry(FrappeTestCase): @@ -20,11 +20,7 @@ def setUpClass(cls): frappe.db.set_single_value("GST Settings", "enable_overseas_transactions", 1) def test_create_bill_of_entry(self): - pi = create_transaction( - doctype="Purchase Invoice", - supplier="_Test Foreign Supplier", - update_stock=1, - ) + pi = create_purchase_invoice(supplier="_Test Foreign Supplier", update_stock=1) # Create BOE boe = make_bill_of_entry(pi.name) diff --git a/india_compliance/gst_india/overrides/test_transaction.py b/india_compliance/gst_india/overrides/test_transaction.py index 4fd8b4ca9f..02a9d5bea1 100644 --- a/india_compliance/gst_india/overrides/test_transaction.py +++ b/india_compliance/gst_india/overrides/test_transaction.py @@ -47,6 +47,9 @@ def setUp(cls): # Hack. Avoid failing validations as quotation does not have customer field cls.transaction_details.customer = "_Test Registered Customer" + if cls.doctype == "Purchase Invoice": + cls.transaction_details.bill_no = frappe.generate_hash(length=5) + def test_transaction_for_unregistered_company(self): if self.is_sales_doctype: self.transaction_details.customer = "_Test Registered Customer"