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"))
Beispiel #2
0
 def test_user(self):
     try:
         s = Shanbay('ggppwx', '3006216088')
         s.login()
         api = DictAPI(s)
         user = api.user().json()
         print(user)
     except:
         pass
Beispiel #3
0
 def test_user(self):
     try:
         s = Shanbay('ggppwx', '3006216088')
         s.login()
         api = DictAPI(s)
         user = api.user().json()
         print(user)
     except:
         pass
Beispiel #4
0
def test_login():
    s = Shanbay('root', 'root')
    s.login()
Beispiel #5
0
 def test_login(self):
     try:
         s = Shanbay('ggppwx', '3006216088')
         s.login()
     except:
         self.fail("login failure")
Beispiel #6
0
 def test_login(self):
     try:
         s = Shanbay('ggppwx', '3006216088')
         s.login()
     except:
         self.fail("login failure")
Beispiel #7
0
#!/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')