Changeset 35c72b7
- Timestamp:
- 2021-03-17T14:24:03Z (4 years ago)
- Children:
- f1ba258
- Parents:
- 0e2c8b4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
.tests/test1.py
r0e2c8b4 r35c72b7 7 7 MESSAGETEST = True 8 8 BLOCKTEST = False 9 OFFLINETEST = False9 OFFLINETEST = True 10 10 RENAMETEST = True 11 11 STATUSTEST= True … … 165 165 clis[1].send_priv_msg("&bitlbee", "set status "+status) 166 166 clis[0].send_priv_msg("&bitlbee", "info "+clis[1].nick) 167 clis[0].receive() 168 ret = (clis[0].tmp_log.find("jabber - Status message: "+status) != -1) 167 ret = (clis[0].receive().find("jabber - Status message: "+status) != -1) 169 168 170 169 clis[1].send_priv_msg("&bitlbee", "set -del status") 171 170 clis[0].send_priv_msg("&bitlbee", "info "+clis[1].nick) 172 clis[0].receive() 173 ret = ret & (clis[0].tmp_log.find("jabber - Status message: none") != -1) 171 ret = ret & (clis[0].receive().find("jabber - Status message: none") != -1) 174 172 return ret 175 173 176 174 def offline_test(clis): 177 pass 175 clis[0].send_priv_msg("&bitlbee", "account off") 176 177 junk = clis[0].receive() 178 ret = (junk.find(clis[1].nick) != -1) 179 ret = ret & (junk.find("has quit") != -1) 180 181 junk = clis[1].receive() 182 ret = ret & (junk.find(clis[0].nick) != -1) 183 ret = ret & (junk.find("has quit") != -1) 184 185 clis[0].send_priv_msg(clis[1], "sup") 186 ret = ret & (clis[0].receive().find("User does not exist: "+clis[1].nick) != -1) 187 188 clis[0].send_priv_msg("&bitlbee", "account on") 189 190 junk = clis[0].receive() 191 ret = ret & (junk.find(clis[1].nick) != -1) 192 ret = ret & (junk.find("has joined") != -1) 193 194 junk = clis[1].receive() 195 ret = ret & (junk.find(clis[0].nick) != -1) 196 ret = ret & (junk.find("has joined") != -1) 197 198 return ret 178 199 179 200 def run_tests(failed): … … 204 225 if STATUSTEST: 205 226 perform_test(failed, clis, status_test, "Change status") 227 228 if OFFLINETEST: 229 perform_test(failed, clis, status_test, "Go offline") 206 230 207 231 if failed or SHOWLOG:
Note: See TracChangeset
for help on using the changeset viewer.