Changeset 0e2c8b4


Ignore:
Timestamp:
2021-03-17T14:13:48Z (4 weeks ago)
Author:
/ <>
Children:
35c72b7
Parents:
a3d01fb
Message:

status test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/test1.py

    ra3d01fb r0e2c8b4  
    99OFFLINETEST = False
    1010RENAMETEST = True
     11STATUSTEST= True
    1112SHOWLOG = False
    1213SHOWTESTLOG = True
     
    160161    return ret
    161162
     163def status_test(clis):
     164    status = "get out of my room mom"
     165    clis[1].send_priv_msg("&bitlbee", "set status "+status)
     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)
     169
     170    clis[1].send_priv_msg("&bitlbee", "set -del status")
     171    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)
     174    return ret
     175
     176def offline_test(clis):
     177    pass
     178
    162179def run_tests(failed):
    163180    clis = []
     
    184201    if RENAMETEST:
    185202        perform_test(failed, clis, rename_test, "Rename user")
     203
     204    if STATUSTEST:
     205        perform_test(failed, clis, status_test, "Change status")
    186206
    187207    if failed or SHOWLOG:
Note: See TracChangeset for help on using the changeset viewer.