Skip to content

Commit

Permalink
Nosetests modified to support new fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
DosMaster committed Feb 16, 2021
1 parent 996921b commit 6c79a3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions enocean/communicators/tests/test_communicator.py
Expand Up @@ -30,7 +30,7 @@ def test_buffer():
@timing(1000)
def test_send():
''' Test sending packets to Communicator '''
com = Communicator()
com = Communicator(get_base_id=False)
assert com.send('AJSNDJASNDJANSD') is False
assert com.transmit.qsize() == 0
assert com._get_from_send_queue() is None
Expand All @@ -40,7 +40,7 @@ def test_send():


def test_stop():
com = Communicator()
com = Communicator(get_base_id=False)
com.stop()
assert com._stop_flag.is_set()

Expand All @@ -58,14 +58,18 @@ def callback(packet):
0x75
])

com = Communicator(callback=callback)
com = Communicator(callback=callback, get_base_id=False)
com._buffer.extend(data)
com.parse()
assert com.receive.qsize() == 0


def test_base_id():
com = Communicator()
def callback(packet):
assert isinstance(packet, RadioPacket)

com = Communicator(callback=callback)
assert com.transmit.qsize() == 1
assert com.base_id is None

other_data = bytearray([
Expand Down

0 comments on commit 6c79a3d

Please sign in to comment.