[fixes] test cases and tax rule validation
This commit is contained in:
parent
c663f5c2bd
commit
0bd145a608
@ -53,8 +53,10 @@ class TaxRule(Document):
|
||||
"supplier": self.supplier,
|
||||
"supplier_type": self.supplier_type,
|
||||
"billing_city": self.billing_city,
|
||||
"billing_state": self.billing_state,
|
||||
"billing_country": self.billing_country,
|
||||
"shipping_city": self.shipping_city,
|
||||
"shipping_state": self.shipping_state,
|
||||
"shipping_country": self.shipping_country,
|
||||
"company": self.company
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
"sales_tax_template": "_Test Tax 1",
|
||||
"use_for_shopping_cart": 1,
|
||||
"billing_city": "_Test City",
|
||||
"billing_state": "Test State",
|
||||
"billing_country": "India",
|
||||
"shipping_city": "_Test City",
|
||||
"shipping_country": "India",
|
||||
@ -19,6 +20,7 @@
|
||||
"billing_city": "_Test City",
|
||||
"billing_country": "India",
|
||||
"shipping_city": "_Test City",
|
||||
"shipping_state": "Test State",
|
||||
"shipping_country": "India",
|
||||
"priority": 2,
|
||||
"company": "_Test Company"
|
||||
|
@ -7,11 +7,11 @@ import frappe
|
||||
import unittest
|
||||
from erpnext.accounts.doctype.tax_rule.tax_rule import IncorrectCustomerGroup, IncorrectSupplierType, ConflictingTaxRule, get_tax_template
|
||||
|
||||
# test_records = frappe.get_test_records('Tax Rule')
|
||||
test_records = frappe.get_test_records('Tax Rule')
|
||||
|
||||
class TestTaxRule(unittest.TestCase):
|
||||
def setUp(self):
|
||||
frappe.db.sql("delete from `tabTax Rule`")
|
||||
frappe.db.sql("delete from `tabTax Rule` where use_for_shopping_cart <> 1")
|
||||
|
||||
def test_customer_group(self):
|
||||
tax_rule = make_tax_rule(customer= "_Test Customer", customer_group= "_Test Customer Group 1",
|
||||
|
@ -3,7 +3,8 @@
|
||||
"address_line1": "_Test Address Line 1",
|
||||
"address_title": "_Test Address",
|
||||
"address_type": "Office",
|
||||
"city": "_Test City",
|
||||
"city": "_Test City",
|
||||
"state": "Test State",
|
||||
"country": "India",
|
||||
"customer": "_Test Customer",
|
||||
"customer_name": "_Test Customer",
|
||||
|
Loading…
Reference in New Issue
Block a user