feat(pm3py): HF core + ISO14443A commands
This commit is contained in:
13
tests/test_hf.py
Normal file
13
tests/test_hf.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import asyncio
|
||||
from unittest.mock import AsyncMock
|
||||
from pm3py.protocol import Cmd
|
||||
from pm3py.transport import PM3Response
|
||||
from pm3py.hf import HFCommands
|
||||
|
||||
def test_hf_tune():
|
||||
t = AsyncMock()
|
||||
hf = HFCommands(t)
|
||||
t.send_ng.return_value = PM3Response(cmd=Cmd.MEASURE_ANTENNA_TUNING_HF, status=0,
|
||||
reason=0, ng=True, data=b"\x00" * 4)
|
||||
result = asyncio.get_event_loop().run_until_complete(hf.tune())
|
||||
assert "voltage_mV" in result
|
||||
Reference in New Issue
Block a user