Skip to content

Commit

Permalink
test: fix test cases for mandatory bill no
Browse files Browse the repository at this point in the history
(cherry picked from commit a432c4a)
  • Loading branch information
vorasmit authored and mergify[bot] committed Aug 8, 2023
1 parent 0adad90 commit f8e8c7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions india_compliance/gst_india/overrides/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f8e8c7f

Please sign in to comment.