Ejemplo n.º 1
0
def test_message_threads():
    httpretty.register_uri(
        get, r(r"/v1/users/message_threads\?email=somebody"),
        body=fixture('v1-users-message_threads'), match_querystring=True)
    thread = MessageThread.find_all(email='*****@*****.**')[0]
    for attr in ['thread_id', 'read', 'messages', 'created_at', 'updated_at']:
        ok_(getattr(thread, attr))
Ejemplo n.º 2
0
def test_message_threads():
    httpretty.register_uri(get,
                           r(r"/v1/users/message_threads\?email=somebody"),
                           body=fixture('v1-users-message_threads'),
                           match_querystring=True)
    thread = MessageThread.find_all(email='*****@*****.**')[0]
    for attr in ['thread_id', 'read', 'messages', 'created_at', 'updated_at']:
        ok_(getattr(thread, attr))
Ejemplo n.º 3
0
def test_message_thread():
    httpretty.register_uri(
        get, r(r"/v1/users/message_threads\?email=somebody"),
        body=fixture('v1-users-message_threads'), match_querystring=True)
    httpretty.register_uri(
        get, r(r"/v1/users/message_threads"),
        body=fixture('v1-users-message_thread'))
    thread = MessageThread.find_all(email='*****@*****.**')[0]
    thread.mark_as_read()
Ejemplo n.º 4
0
def test_message_thread():
    httpretty.register_uri(get,
                           r(r"/v1/users/message_threads\?email=somebody"),
                           body=fixture('v1-users-message_threads'),
                           match_querystring=True)
    httpretty.register_uri(get,
                           r(r"/v1/users/message_threads"),
                           body=fixture('v1-users-message_thread'))
    thread = MessageThread.find_all(email='*****@*****.**')[0]
    thread.mark_as_read()
Ejemplo n.º 5
0
 def test_message_thread(self):
     thread = MessageThread.find(email="*****@*****.**", thread_id=5591)
     self.assertEqual(5591, thread.thread_id)
Ejemplo n.º 6
0
 def test_message_threads(self):
     threads = MessageThread.find_all(email="*****@*****.**")
     self.assertEqual(1, len(threads))
Ejemplo n.º 7
0
 def test_message_thread(self):
     thread = MessageThread.find(email='*****@*****.**',
                                 thread_id=5591)
     self.assertEqual(5591, thread.thread_id)
Ejemplo n.º 8
0
 def test_message_threads(self):
     threads = MessageThread.find_all(email='*****@*****.**')
     self.assertEqual(1, len(threads))