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