Changeset 3b6a6e5 for .tests/btlib.py
- Timestamp:
- 2021-03-31T13:36:39Z (4 years ago)
- Children:
- b2d7fdd
- Parents:
- 19f5c94
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
.tests/btlib.py
r19f5c94 r3b6a6e5 145 145 clis[1].receive() 146 146 clis[1].send_priv_msg("&bitlbee", "account list") 147 time.sleep(0.5)148 147 ret = ret & (clis[1].receive().find(clis[1].nick+'@localhost') != -1) 149 148 … … 152 151 clis[1].receive() 153 152 clis[1].send_priv_msg("&bitlbee", "account list") 154 time.sleep(0.5)155 153 ret = ret & (clis[1].receive().find(clis[1].nick+'@localhost') != -1) 156 154 … … 159 157 clis[1].receive() 160 158 clis[1].send_priv_msg("&bitlbee", "account list") 161 time.sleep(0.5)162 159 ret = ret & (clis[1].receive().find(clis[1].nick+'@localhost') == -1) 163 160 return ret … … 170 167 def unregister_test(clis): 171 168 clis[1].send_priv_msg("&bitlbee", "drop "+clis[1].pwd*2) 172 time.sleep(0.5)173 169 ret = (clis[1].receive().find('removed') != -1) 174 170 clis[1].send_priv_msg("&bitlbee", "drop "+clis[1].pwd*2) 175 time.sleep(0.5)176 171 ret = ret & (clis[1].receive().find('That account does not exist') != -1) 177 172 return ret … … 180 175 ret = True 181 176 clis[1].send_priv_msg("&bitlbee", "identify "+clis[1].pwd) 182 time.sleep(0.5)183 177 ret = ret & (clis[1].receive().find('Incorrect password') != -1) 184 178 185 179 clis[1].send_priv_msg("&bitlbee", "identify "+clis[1].pwd*2) 186 time.sleep(0.5)187 180 ret = ret & (clis[1].receive().find('Password accepted') != -1) 188 181 return ret 189 182 190 183 def identify_nonexist_test(clis): 191 clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd) 192 time.sleep(0.5) 184 clis[1].send_priv_msg("&bitlbee", "identify "+clis[1].pwd) 193 185 return (clis[1].receive().find('The nick is (probably) not registered') != -1) 194 186 … … 216 208 clis[0].add_jabber_buddy(clis[1].nick) 217 209 clis[1].send_priv_msg("&bitlbee", "yes") 218 time.sleep(1)219 210 clis[0].send_priv_msg("&bitlbee", "blist all") 220 time.sleep(0.5) 221 junk = clis[0].receive() 211 junk = clis[0].receive(wait=5) 222 212 #ret = ret & (junk.find("1 available") != -1) 223 213 ret = ret & (junk.find(clis[1].nick) != -1)
Note: See TracChangeset
for help on using the changeset viewer.