[small fixes] frozen customer testcase
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index 040e3b1..01e4813 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -6,7 +6,7 @@
 from frappe.model.naming import make_autoname
 from frappe import _, msgprint, throw
 import frappe.defaults
-from frappe.utils import flt, cint,
+from frappe.utils import flt, cint, cstr
 from frappe.desk.reportview import build_match_conditions
 from erpnext.utilities.transaction_base import TransactionBase
 from erpnext.utilities.address_and_contact import load_address_and_contact
diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py
index 9972ae8..0bbe534 100644
--- a/erpnext/selling/doctype/customer/test_customer.py
+++ b/erpnext/selling/doctype/customer/test_customer.py
@@ -68,6 +68,9 @@
 		frappe.rename_doc("Customer", "_Test Customer 1 Renamed", "_Test Customer 1")
 
 	def test_freezed_customer(self):
+		make_test_records("Customer")
+		make_test_records("Item")
+		
 		frappe.db.set_value("Customer", "_Test Customer", "is_frozen", 1)
 
 		from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
@@ -91,7 +94,7 @@
 			}).insert(ignore_permissions=True)
 		else:
 			test_customer_1 = frappe.get_doc("Customer", "_Test Customer 1")
-		
+
 		duplicate_customer = frappe.get_doc({
 			 "customer_group": "_Test Customer Group",
 			 "customer_name": "_Test Customer 1",
@@ -99,7 +102,7 @@
 			 "doctype": "Customer",
 			 "territory": "_Test Territory"
 		}).insert(ignore_permissions=True)
-		
+
 		self.assertEquals("_Test Customer 1", test_customer_1.name)
 		self.assertEquals("_Test Customer 1 - 1", duplicate_customer.name)
-		self.assertEquals(test_customer_1.customer_name, duplicate_customer.customer_name)		
\ No newline at end of file
+		self.assertEquals(test_customer_1.customer_name, duplicate_customer.customer_name)
\ No newline at end of file