Skip to content

Commit 81185ca

Browse files
committed
tests: update runtests.sh and test_Handshake.py
1 parent 0a7b244 commit 81185ca

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

runtests.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
#sleep 2
77
clear
88

9-
echo "** Starting unittest/pytest .."
9+
echo "** Starting pytest .."
1010
sleep 2
11-
python3 -m unittest discover tests -v
11+
#python3 -m unittest discover tests -v
1212
sleep 2
13+
pytest -k testNoHandshakeTshark
14+
#sleep 2
1315
echo "** runtests.sh test script at the end"

tests/test_Handshake.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ def testAnalyze(self):
3333
def testHandshakeTshark(self):
3434
print("\nTesting handshake with tshark...")
3535
hs_file = self.getFile("handshake_exists.cap")
36+
print("Testing file:", hs_file)
3637
hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
37-
assert (len(hs.tshark_handshakes()) > 0), f'Expected len>0 but got len({len(hs.tshark_handshakes())})'
38+
handshakes = hs.tshark_handshakes()
39+
print(f"Found {len(handshakes)} handshake(s): {handshakes}")
40+
assert len(handshakes) > 0, f'Expected len>0 but got len({len(handshakes)})'
3841

3942
@unittest.skipUnless(Process.exists("cowpatty"), 'cowpatty is missing')
4043
def testHandshakeCowpatty(self):

0 commit comments

Comments
 (0)