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)
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)
def test_get_all_members(self): api = BC_API() api.login() api.get_all_members()
def test_get_all_robots(self): api = BC_API() api.login() api.get_all_robots()