Exemplo n.º 1
0
    def test_get_ws_url(self):
        api = BC_API()
        api.login()
        ws_url = api.get_ws_url()
        import re
        r = re.compile("wss://bearychat.com/nimbus/ws:(\w+)")
        find_list = r.findall(ws_url)
        self.assertNotEqual(len(find_list), 0)

        ws = find_list[0]
        self.assertNotEqual(len(ws), 0)
Exemplo n.º 2
0
    def start_server(self):
        api = BC_API()
        api.login()
        ws_url = api.get_ws_url()

        ws = create_connection(ws_url)
        Logger.log("connected to bc server")

        # send ping thread
        threading.Thread(target=self.send_ping, args=(ws, )).start()

        # loop worker
        self.server_loop(ws)
Exemplo n.º 3
0
 def test_get_all_members(self):
     api = BC_API()
     api.login()
     api.get_all_members()
Exemplo n.º 4
0
 def test_get_all_robots(self):
     api = BC_API()
     api.login()
     api.get_all_robots()