fix: properly validate the last-type search query

pull/265/head
Raphaël Vinot 2018-08-13 13:31:30 +02:00
parent 9669d892c5
commit 75b15af427
1 changed files with 4 additions and 0 deletions

View File

@ -224,6 +224,10 @@ class TestComprehensive(unittest.TestCase):
# Test invalid query # Test invalid query
response = pub_misp_connector.search(publish_timestamp='5x') response = pub_misp_connector.search(publish_timestamp='5x')
self.assertEqual(len(response), 0) self.assertEqual(len(response), 0)
response = pub_misp_connector.search(publish_timestamp='ad')
self.assertEqual(len(response), 0)
response = pub_misp_connector.search(publish_timestamp='aaad')
self.assertEqual(len(response), 0)
# Search as user # Search as user
# # Test - last 4 min # # Test - last 4 min
response = pub_misp_connector.search(publish_timestamp='5s') response = pub_misp_connector.search(publish_timestamp='5s')