Example #1
0
 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/')
Example #2
0
 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
Example #3
0
 def test_send_emoji(self):
     body = '👍'
     send.send_msg(self.session, self.c_user, self.fb_dtsg,
                   self.group_id, body, group=True)
Example #4
0
 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)
Example #5
0
 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)