Changeset bda5012


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

wat

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • .github/workflows/ci.yml

    rb77884c rbda5012  
    4646        ./.tests/cleanup_bitlbee.sh
    4747
    48     - name: (un)register
     48    - name: register
    4949      run: |
    5050        ./.tests/setup_prosody.sh
     
    5757
    5858        python3 ./.tests/identify.py
     59
     60        ./.tests/cleanup_bitlbee.sh
     61        ./.tests/cleanup_prosody.sh
     62
     63    - name: unregister
     64      run: |
     65        ./.tests/setup_prosody.sh
     66        ./.tests/setup_bitlbee.sh
     67
    5968        python3 ./.tests/unregister.py
    6069
  • .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.