Changeset 5d927631 for .tests/btlib.py


Ignore:
Timestamp:
2021-03-31T11:50:18Z (4 years ago)
Author:
/ <>
Children:
07ade22
Parents:
0a98f92
Message:

register

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/btlib.py

    r0a98f92 r5d927631  
    159159    return ret
    160160
     161def 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   
     166def 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
     175def 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
     186def 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
    161191def add_buddy_test(clis):
    162192    clis[0].add_jabber_buddy(clis[1].nick)
Note: See TracChangeset for help on using the changeset viewer.