Changeset 0167270


Ignore:
Timestamp:
2021-03-16T15:03:06Z (2 months ago)
Author:
/ <>
Children:
da75c3d
Parents:
d28ca33
Message:

asdasd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/test1.py

    rd28ca33 r0167270  
    2323        self.sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    2424
    25     def send_raw(self, msg, loud = False):
     25    def send_raw(self, msg, loud = False, log = True):
    2626        self.receive()
    2727        if loud:
    2828            print('FROM '+ self.nick + '|| ' + msg)
    29         self.log += msg+'\r\n'
    30         self.tmplog += msg+'\r\n'
     29        if log:
     30            self.log += msg+'\r\n'
     31            self.tmplog += msg+'\r\n'
    3132        self.sck.send((msg+'\r\n').encode())
    3233
     
    112113                print("Test Log "+ cli.nick+":")
    113114                print(cli.tmplog)
    114 
    115115    print(SEPARATOR)
    116116
     
    118118    ret = False
    119119    for _ in range(100):
    120         clis[0].send_raw("yes", loud = False)
     120        clis[0].send_raw("PRIVMSG yes", loud = False, log = False)
    121121        clis[0].receive()
    122         if (not ret) and clis[0].log.find("Did I ask you something?"):
     122        if (not ret) and (clis[0].log.find("Did I ask you something?") != -1):
    123123            ret = True
    124         if clis[0].log.find("Buuuuuuuuuuuuuuuurp"):
     124        if clis[0].log.find("Buuuuuuuuuuuuuuuurp") != -1:
     125            ret = True
    125126            print("The RNG gods smile upon us")
    126127            break
     
    161162        perform_test(failed, clis, yes_test, "Yes")
    162163
     164    print("")
    163165    for cli in clis:
    164166        cli.jabber_login()
Note: See TracChangeset for help on using the changeset viewer.