def test_pull_att(self): p = Pull() body = 'https://www.google.com/' send.send_msg(self.session, self.c_user, self.fb_dtsg, self.recipient_id, body, group=False) for msg in p.get(self.session, self.c_user): self.assertEqual(msg.attachment, 'https://www.google.com/')
def test_pull_id(self): p = Pull() flag = 0 while True: body = 'Hello, sad world.[{}]'.format(int(time.time())) send.send_msg(self.session, self.c_user, self.fb_dtsg, self.recipient_id, body, group=False) for msg in p.get(self.session, self.c_user): self.assertTrue(msg.thread_fbid or msg.other_user_fbid) if msg.thread_fbid or msg.other_user_fbid: flag += 1 break if flag > 1: break
def test_send_emoji(self): body = '👍' send.send_msg(self.session, self.c_user, self.fb_dtsg, self.group_id, body, group=True)
def test_send_group_msg(self): body = 'Hello, sad world.[{}]'.format(time.time()) send.send_msg(self.session, self.c_user, self.fb_dtsg, self.group_id, body, group=True)
def test_send_personal_msg(self): body = 'Hello, sad world.[{}]'.format(time.time()) send.send_msg(self.session, self.c_user, self.fb_dtsg, self.friend_id, body, group=False)