Skip to content

Commit

Permalink
refactor(test): use test fixture in purchase invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Oct 15, 2023
1 parent 3bdf4f6 commit a2e064d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import unittest

import frappe
from frappe.tests.utils import change_settings
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.utils import add_days, cint, flt, getdate, nowdate, today

import erpnext
Expand Down Expand Up @@ -38,7 +38,7 @@
test_ignore = ["Serial No"]


class TestPurchaseInvoice(unittest.TestCase, StockTestMixin):
class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
@classmethod
def setUpClass(self):
unlink_payment_on_cancel_of_invoice()
Expand All @@ -48,6 +48,9 @@ def setUpClass(self):
def tearDownClass(self):
unlink_payment_on_cancel_of_invoice(0)

def tearDown(self):
frappe.db.rollback()

def test_purchase_invoice_received_qty(self):
"""
1. Test if received qty is validated against accepted + rejected
Expand Down

0 comments on commit a2e064d

Please sign in to comment.