Fixing unit tests

This commit is contained in:
derv82
2015-06-03 20:46:56 -07:00
parent 3faa01c9e8
commit 9b7cc7fb8d
2 changed files with 9 additions and 24 deletions

View File

@@ -1,5 +1,8 @@
#!/usr/bin/python
import sys
sys.path.insert(0, '..')
from Handshake import Handshake
import unittest
@@ -16,7 +19,8 @@ class TestHandshake(unittest.TestCase):
def testAnalyze(self):
hs_file = self.getFile('handshake_exists.cap')
hs = Handshake(hs_file, bssid='30:85:a9:39:d2:18')
print hs_file
hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
try:
hs.analyze()
except Exception, e:
@@ -24,23 +28,23 @@ class TestHandshake(unittest.TestCase):
def testHandshakeTshark(self):
hs_file = self.getFile('handshake_exists.cap')
hs = Handshake(hs_file, bssid='30:85:a9:39:d2:18')
hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
assert(len(hs.tshark_handshakes()) > 0)
def testHandshakePyrit(self):
hs_file = self.getFile('handshake_exists.cap')
hs = Handshake(hs_file, bssid='30:85:a9:39:d2:18')
hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
assert(len(hs.pyrit_handshakes()) > 0)
def testHandshakeCowpatty(self):
hs_file = self.getFile('handshake_exists.cap')
hs = Handshake(hs_file, bssid='30:85:a9:39:d2:18')
hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
hs.divine_bssid_and_essid()
assert(len(hs.cowpatty_handshakes()) > 0)
def testHandshakeAircrack(self):
hs_file = self.getFile('handshake_exists.cap')
hs = Handshake(hs_file, bssid='30:85:a9:39:d2:18')
hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
assert(len(hs.aircrack_handshakes()) > 0)