Merge branch 'develop' into approver-perms
diff --git a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py
index 17e39d5..ce149f9 100644
--- a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py
+++ b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py
@@ -61,7 +61,6 @@
 	def test_debit_credit_output(self):
 		bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"))
 		linked_payments = get_linked_payments(bank_transaction.name, ['payment_entry', 'exact_match'])
-		print(linked_payments)
 		self.assertTrue(linked_payments[0][3])
 
 	# Check error if already reconciled
diff --git a/erpnext/shopping_cart/test_shopping_cart.py b/erpnext/shopping_cart/test_shopping_cart.py
index 470a402..d857bf5 100644
--- a/erpnext/shopping_cart/test_shopping_cart.py
+++ b/erpnext/shopping_cart/test_shopping_cart.py
@@ -56,8 +56,8 @@
 	def test_add_to_cart(self):
 		self.login_as_customer()
 
-		# remove from cart
-		self.remove_all_items_from_cart()
+		# clear existing quotations
+		self.clear_existing_quotations()
 
 		# add first item
 		update_cart("_Test Item", 1)
@@ -208,10 +208,15 @@
 			"_Test Contact For _Test Customer")
 		frappe.set_user("test_contact_customer@example.com")
 
-	def remove_all_items_from_cart(self):
-		quotation = _get_cart_quotation()
-		quotation.flags.ignore_permissions=True
-		quotation.delete()
+	def clear_existing_quotations(self):
+		quotations = frappe.get_all("Quotation", filters={
+			"party_name": get_party().name,
+			"order_type": "Shopping Cart",
+			"docstatus": 0
+		}, order_by="modified desc", pluck="name")
+
+		for quotation in quotations:
+			frappe.delete_doc("Quotation", quotation, ignore_permissions=True, force=True)
 
 	def create_user_if_not_exists(self, email, first_name = None):
 		if frappe.db.exists("User", email):