- Timestamp:
- 2021-03-31T12:57:23Z (4 years ago)
- Children:
- bc346a2
- Parents:
- b77884c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
.tests/btlib.py
rb77884c rbda5012 63 63 return (self.log.find('Logged in') != -1) 64 64 65 def receive(self ):65 def receive(self, wait = 1): 66 66 text = '' 67 67 while True: … … 73 73 self.send_raw('PONG ' + line.split()[1]) 74 74 else: 75 break 75 time.sleep(wait) 76 if self.sck not in readable: 77 break 76 78 self.log += text 77 79 self.tmplog += text … … 160 162 161 163 def register_test(clis): 162 ret = False163 164 clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd*2) 164 for a in range(20): 165 if (clis[1].receive().find('Account successfully created') != -1): 166 ret = True 167 break 168 time.sleep(0.5) 165 ret = (clis[1].receive(wait = 10).find('Account successfully created') != -1) 166 print("What is this"+ ret) 169 167 return ret 170 168
Note: See TracChangeset
for help on using the changeset viewer.