[test] fixed circular dependencies
diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py
index 85b216b..9e53845 100644
--- a/erpnext/selling/doctype/customer/test_customer.py
+++ b/erpnext/selling/doctype/customer/test_customer.py
@@ -11,8 +11,6 @@
test_ignore = ["Price List"]
-test_dependencies = ['Quotation']
-
test_records = frappe.get_test_records('Customer')
class TestCustomer(unittest.TestCase):
@@ -113,47 +111,6 @@
self.assertEquals("_Test Customer 1 - 1", duplicate_customer.name)
self.assertEquals(test_customer_1.customer_name, duplicate_customer.customer_name)
- def test_party_status_open(self):
- from erpnext.selling.doctype.quotation.test_quotation import get_quotation_dict
-
- customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
- quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
- quotation.submit()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
- quotation.cancel()
- quotation.delete()
- customer.delete()
-
- def test_party_status_close(self):
- from erpnext.selling.doctype.quotation.test_quotation import get_quotation_dict
-
- customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
- # open quotation
- quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
- # close quotation (submit)
- quotation.submit()
-
- quotation1 = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
-
- # still open
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
- quotation.cancel()
- quotation.delete()
-
- quotation1.delete()
-
- customer.delete()
-
def get_customer_dict(customer_name):
return {
"customer_group": "_Test Customer Group",
diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py
index 36cc472..7a59dd7 100644
--- a/erpnext/selling/doctype/quotation/test_quotation.py
+++ b/erpnext/selling/doctype/quotation/test_quotation.py
@@ -68,6 +68,47 @@
self.assertEquals(quotation.get("items")[0].rate, total_margin)
si.save()
+ def test_party_status_open(self):
+ from erpnext.selling.doctype.customer.test_customer import get_customer_dict
+
+ customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
+ self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
+
+ quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
+ self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
+
+ quotation.submit()
+ self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
+
+ quotation.cancel()
+ quotation.delete()
+ customer.delete()
+
+ def test_party_status_close(self):
+ from erpnext.selling.doctype.customer.test_customer import get_customer_dict
+
+ customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
+ self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
+
+ # open quotation
+ quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
+ self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
+
+ # close quotation (submit)
+ quotation.submit()
+
+ quotation1 = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
+
+ # still open
+ self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
+
+ quotation.cancel()
+ quotation.delete()
+
+ quotation1.delete()
+
+ customer.delete()
+
test_records = frappe.get_test_records('Quotation')
def get_quotation_dict(customer=None, item_code=None):
diff --git a/erpnext/utilities/doctype/address/test_address.py b/erpnext/utilities/doctype/address/test_address.py
index 26634b8..36f2535 100644
--- a/erpnext/utilities/doctype/address/test_address.py
+++ b/erpnext/utilities/doctype/address/test_address.py
@@ -6,8 +6,6 @@
import frappe
test_records = frappe.get_test_records('Address')
-test_dependencies = ['Customer']
-
import unittest
import frappe