Fixed regression tests for type error

This commit is contained in:
Gerard Wagener 2010-01-19 14:44:09 +01:00
parent 52d235b957
commit 46cb4e483f

View file

@ -292,11 +292,11 @@ class TestProcessTree(unittest.TestCase):
x = ProcessTrees() x = ProcessTrees()
x.annotateProcessList(msg) x.annotateProcessList(msg)
# Check if information is there # Check if information is there
self.assertEqual(x.aplist['1139']['timestamp'],'1263846206') self.assertEqual(x.aplist[1139]['timestamp'],'1263846206')
s = "192.168.1.23 49826 22" s = "192.168.1.23 49826 22"
self.assertEqual(x.aplist['1139']['ssh_client'],s) self.assertEqual(x.aplist[1139]['ssh_client'],s)
self.assertEqual(x.aplist['1139']['file'], '/usr/bin/lesspipe') self.assertEqual(x.aplist[1139]['file'], '/usr/bin/lesspipe')
x.addUser('1139') x.addUser(1139)
#Test export #Test export
x.exportUserListTxt('/tmp/userlist.txt') x.exportUserListTxt('/tmp/userlist.txt')
if __name__ == '__main__': if __name__ == '__main__':