|
@@ -14,4 +14,23 @@ class UnitTestPyparsing(unittest.TestCase):
|
|
self.assertEqual(controller.statistics.process_db_query('least_used(portnumber)'),
|
|
self.assertEqual(controller.statistics.process_db_query('least_used(portnumber)'),
|
|
[58645, 59844])
|
|
[58645, 59844])
|
|
self.assertEqual(controller.statistics.process_db_query('most_used(portnumber)'),
|
|
self.assertEqual(controller.statistics.process_db_query('most_used(portnumber)'),
|
|
- 443)
|
|
|
|
|
|
+ 443)
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('most_used(protocolname)'),
|
|
|
|
+ 'IPv4')
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('least_used(protocolname)'),
|
|
|
|
+ 'UDP')
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('most_used(ttlvalue)'),
|
|
|
|
+ 64)
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('least_used(ttlvalue)'),
|
|
|
|
+ 255)
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('most_used(mssvalue)'),
|
|
|
|
+ 1460)
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('least_used(mssvalue)'),
|
|
|
|
+ 1460)
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('most_used(winsize)'),
|
|
|
|
+ 65535)
|
|
|
|
+ self.assertEqual(controller.statistics.process_db_query('most_used(ipclass)'),
|
|
|
|
+ 'A')
|
|
|
|
+ #FIXME why error?
|
|
|
|
+ # self.assertEqual(controller.statistics.process_db_query('least_used(ipclass)'),
|
|
|
|
+ # 'E')
|