Пример #1
0
	def test_get_cart_customer(self):
		self.login_as_customer()
		
		# test if quotation with customer is fetched
		quotation = get_quotation()
		self.assertEquals(quotation.doc.quotation_to, "Customer")
		self.assertEquals(quotation.doc.customer, "_Test Customer")
Пример #2
0
	def test_get_cart_lead(self):
		self.login_as_lead()

		# test if quotation with lead is fetched
		quotation = get_quotation()
		self.assertEquals(quotation.quotation_to, "Lead")
		self.assertEquals(quotation.lead, frappe.db.get_value("Lead", {"email_id": "*****@*****.**"}))
		self.assertEquals(quotation.customer, None)
		self.assertEquals(quotation.contact_email, frappe.session.user)

		return quotation
Пример #3
0
	def test_get_cart_customer(self):
		self.login_as_customer()

		# test if quotation with customer is fetched
		quotation = get_quotation()
		self.assertEquals(quotation.quotation_to, "Customer")
		self.assertEquals(quotation.customer, "_Test Customer")
		self.assertEquals(quotation.lead, None)
		self.assertEquals(quotation.contact_email, frappe.session.user)

		return quotation
Пример #4
0
	def test_get_cart_new_user(self):
		self.login_as_new_user()

		# test if lead is created and quotation with new lead is fetched
		quotation = get_quotation()
		self.assertEquals(quotation.quotation_to, "Lead")
		self.assertEquals(frappe.db.get_value("Lead", quotation.lead, "email_id"), "*****@*****.**")
		self.assertEquals(quotation.customer, None)
		self.assertEquals(quotation.contact_email, frappe.session.user)

		return quotation