示例#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))
示例#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))
示例#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()
示例#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()
示例#5
0
 def test_message_threads(self):
     threads = MessageThread.find_all(email="*****@*****.**")
     self.assertEqual(1, len(threads))
示例#6
0
 def test_message_threads(self):
     threads = MessageThread.find_all(email='*****@*****.**')
     self.assertEqual(1, len(threads))