Changeset 7361a6a


Ignore:
Timestamp:
2021-03-17T15:39:39Z (4 weeks ago)
Author:
/ <>
Children:
5552588
Parents:
76f0fd1
Message:

default target

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/test1.py

    r76f0fd1 r7361a6a  
    99OFFLINETEST = True
    1010RENAMETEST = True
    11 STATUSTEST= True
     11STATUSTEST = True
     12DEFAULTTARGETTEST = True
    1213SHOWLOG = False
    1314SHOWTESTLOG = True
     
    200201    return ret
    201202
     203def default_target_test(clis):
     204    clis[0].send_priv_msg("&bitlbee", "set default_target last")
     205    ret = msg_comes_thru(clis[0], clis[1], "ur mah default now")
     206
     207    clis[0].send_priv_msg("&bitlbee", "~~~")
     208    ret = ret & (clis[1].receive().find("~~~") != -1)
     209
     210    clis[0].send_priv_msg("root", "set default_target root")
     211    ret = ret & (clis[0].receive().find("default target") != -1)
     212
     213    clis[0].send_priv_msg("&bitlbee", "yes")
     214    ret = ret & (clis[1].receive().find("yes") == -1)
     215    return ret
     216
    202217def run_tests(failed):
    203218    clis = []
     
    233248    if OFFLINETEST:
    234249        perform_test(failed, clis, offline_test, "Go offline")
     250
     251    if DEFAULTTARGETTEST:
     252        perform_test(failed, clis, default_target_test, "Go offline")
    235253
    236254    if failed or SHOWLOG:
Note: See TracChangeset for help on using the changeset viewer.