Skip to content

Commit

Permalink
fix: change in test cases
Browse files Browse the repository at this point in the history
(cherry picked from commit 436aebb)
  • Loading branch information
Sanket322 authored and mergify[bot] committed Sep 20, 2024
1 parent 67df6c6 commit 8ad9566
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion india_compliance/gst_india/utils/e_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ def log_and_process_e_invoice_generation(doc, result, sandbox_mode=False, messag
doc,
{
"irn": doc.irn,
"sales_invoice": doc.name,
"reference_doctype": doc.doctype,
"reference_name": doc.name,
"acknowledgement_number": result.AckNo,
"acknowledged_on": parse_datetime(result.AckDt),
"signed_invoice": result.SignedInvoice,
Expand Down
10 changes: 5 additions & 5 deletions india_compliance/gst_india/utils/test_e_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def test_generate_e_invoice_with_goods_item(self):

self.assertDocumentEqual(
{"name": test_data.get("response_data").get("result").get("Irn")},
frappe.get_doc("e-Invoice Log", {"sales_invoice": si.name}),
frappe.get_doc("e-Invoice Log", {"reference_name": si.name}),
)
self.assertDocumentEqual(
{"name": test_data.get("response_data").get("result").get("EwbNo")},
Expand Down Expand Up @@ -297,7 +297,7 @@ def test_generate_e_invoice_with_service_item(self):

self.assertDocumentEqual(
{"name": test_data.get("response_data").get("result").get("Irn")},
frappe.get_doc("e-Invoice Log", {"sales_invoice": si.name}),
frappe.get_doc("e-Invoice Log", {"reference_name": si.name}),
)

self.assertFalse(
Expand Down Expand Up @@ -356,7 +356,7 @@ def test_generate_e_invoice_with_nil_exempted_item(self):

self.assertDocumentEqual(
{"name": test_data.get("response_data").get("result").get("Irn")},
frappe.get_doc("e-Invoice Log", {"sales_invoice": si.name}),
frappe.get_doc("e-Invoice Log", {"reference_name": si.name}),
)

self.assertFalse(
Expand Down Expand Up @@ -430,7 +430,7 @@ def test_credit_note_e_invoice_with_goods_item(self):

self.assertDocumentEqual(
{"name": test_data.get("response_data").get("result").get("Irn")},
frappe.get_doc("e-Invoice Log", {"sales_invoice": credit_note.name}),
frappe.get_doc("e-Invoice Log", {"reference_name": credit_note.name}),
)

self.assertFalse(
Expand Down Expand Up @@ -495,7 +495,7 @@ def test_debit_note_e_invoice_with_goods_item(self):

self.assertDocumentEqual(
{"name": test_data.get("response_data").get("result").get("Irn")},
frappe.get_doc("e-Invoice Log", {"sales_invoice": debit_note.name}),
frappe.get_doc("e-Invoice Log", {"reference_name": debit_note.name}),
)

self.assertFalse(
Expand Down

0 comments on commit 8ad9566

Please sign in to comment.