Changeset 51f144a for .tests


Ignore:
Timestamp:
2021-03-18T10:56:08Z (4 years ago)
Author:
/ <>
Children:
8d7cc55
Parents:
3d4cb51
Message:

b list movies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/test1.py

    r3d4cb51 r51f144a  
    55
    66YESTEST = True
     7ADDBUDDYTEST = True
    78MESSAGETEST = True
    89BLOCKTEST = False
     
    141142    return ret
    142143
     144def add_buddy_test(clis):
     145    clis[0].add_jabber_buddy(clis[1].nick)
     146    clis[1].add_jabber_buddy(clis[0].nick)
     147
     148    clis[0].send_priv_msg("&bitlbee", "yes")
     149    clis[1].send_priv_msg("&bitlbee", "yes")
     150
     151    clis[0].send_priv_msg("&bitlbee", "blist")
     152    ret = clis[0].receive().find(clis[1].nick) != -1
     153
     154    clis[1].send_priv_msg("&bitlbee", "remove" +clis[1].nick)
     155    clis[0].send_priv_msg("&bitlbee", "blist")
     156    ret = ret & (clis[0].receive().find(clis[1].nick) == -1)
     157
     158    clis[0].add_jabber_buddy(clis[1].nick)
     159    clis[1].send_priv_msg("&bitlbee", "yes")
     160    clis[0].send_priv_msg("&bitlbee", "blist")
     161    ret = ret & (clis[0].receive().find(clis[1].nick) != -1)
     162
    143163def message_test(clis):
    144164    ret = msg_comes_thru(clis[0], clis[1], 'ohai <3')
     
    245265        cli.jabber_login()
    246266
    247     clis[0].add_jabber_buddy(clis[1].nick)
    248     clis[1].add_jabber_buddy(clis[0].nick)
    249     clis[0].send_priv_msg("&bitlbee", "yes")
    250     clis[1].send_priv_msg("&bitlbee", "yes")
     267    if ADDBUDDYTEST:
     268        perform_test(failed, clis, add_buddy_test, "Add/remove buddy")
     269
    251270
    252271    if MESSAGETEST:
Note: See TracChangeset for help on using the changeset viewer.