Changeset 5d927631 for .tests/btlib.py
- Timestamp:
- 2021-03-31T11:50:18Z (4 years ago)
- Children:
- 07ade22
- Parents:
- 0a98f92
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
.tests/btlib.py
r0a98f92 r5d927631 159 159 return ret 160 160 161 def register_test(clis): 162 clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd*2) 163 time.sleep(0.5) 164 return (clis[1].receive().find('Account successfully created') != -1) 165 166 def unregister_test(clis): 167 clis[1].send_priv_msg("&bitlbee", "drop "+clis[1].pwd*2) 168 time.sleep(0.5) 169 ret = (clis[1].receive().find('removed') != -1) 170 clis[1].send_priv_msg("&bitlbee", "drop "+clis[1].pwd*2) 171 time.sleep(0.5) 172 ret = ret & (clis[1].receive().find('That account does not exist') != -1) 173 return ret 174 175 def identify_test(clis): 176 ret = True 177 clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd) 178 time.sleep(0.5) 179 ret = ret & (clis[1].receive().find('Incorrect password') != -1) 180 181 clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd*2) 182 time.sleep(0.5) 183 ret = ret & (clis[1].receive().find('Password accepted') != -1) 184 return ret 185 186 def identify_nonexist_test(clis): 187 clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd) 188 time.sleep(0.5) 189 return (clis[1].receive().find('The nick is (probably) not registered') != -1) 190 161 191 def add_buddy_test(clis): 162 192 clis[0].add_jabber_buddy(clis[1].nick)
Note: See TracChangeset
for help on using the changeset viewer.