def test_shanbay(): sb = Shanbay(USERNAME, PASSWORD) sb.login() print(sb.user_id) print(sb.team_id) print(sb.forum_id) print(sb.get_thread("3128002"))
def test_user(self): try: s = Shanbay('ggppwx', '3006216088') s.login() api = DictAPI(s) user = api.user().json() print(user) except: pass
def test_login(): s = Shanbay('root', 'root') s.login()
def test_login(self): try: s = Shanbay('ggppwx', '3006216088') s.login() except: self.fail("login failure")
#!/usr/bin/env python # -*- coding: utf-8 -*- from shanbay import Shanbay, Message s = Shanbay('root', 'root') s.login() message = Message(s) def test_send_message(): assert message.send_message(['mozillazg'], 'test_send_message', 'test_send_message') def test_reply_message(): url = 'http://www.shanbay.com/message/thread/2687980/' assert message.reply_message(url, 'test_reply_message')