def test_send_customer_comm(self): ent = Enterprise.find_by_name("Healthy U Store") cust = self.get_customer() comms = Communication.find_all(ent.enterprise_id) R = self.get("/crm/communication/send_customer_comm/%s/%s" % (cust.customer_id, comms[0].comm_id)) assert R.status_int == 200 assert R.body == "True"
def test_view_comm_dialog(self): ent = Enterprise.find_by_name("Healthy U Store") cust = self.get_customer() comm = Communication.find_all(ent.enterprise_id)[0] order = cust.get_active_orders()[0] R = self.get( "/crm/communication/view_comm_dialog/%s/%s?order_id=%s&dialog=1" % (cust.customer_id, comm.comm_id, order.order_id) ) assert R.status_int == 200 R.mustcontain("%s %s" % (cust.fname, cust.lname))