Changeset bda5012 for .tests


Ignore:
Timestamp:
2021-03-31T12:57:23Z (4 years ago)
Author:
/ <>
Children:
bc346a2
Parents:
b77884c
Message:

wat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/btlib.py

    rb77884c rbda5012  
    6363        return (self.log.find('Logged in') != -1)
    6464
    65     def receive(self):
     65    def receive(self, wait = 1):
    6666        text = ''
    6767        while True:
     
    7373                        self.send_raw('PONG ' + line.split()[1])
    7474            else:
    75                 break
     75                time.sleep(wait)
     76                if self.sck not in readable:
     77                    break
    7678        self.log += text
    7779        self.tmplog += text
     
    160162
    161163def register_test(clis):
    162     ret = False
    163164    clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd*2)
    164     for a in range(20):
    165         if (clis[1].receive().find('Account successfully created') != -1):
    166             ret = True
    167             break
    168         time.sleep(0.5)
     165    ret = (clis[1].receive(wait = 10).find('Account successfully created') != -1)
     166    print("What is this"+ ret)
    169167    return ret
    170168   
Note: See TracChangeset for help on using the changeset viewer.