Skip to content

Commit 2507e28

Browse files
authored
Merge pull request #55 from gunvirranu/count_parameter_test
Added unit test for count parameter in search function
2 parents 8adf705 + f5e591f commit 2507e28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,14 @@ def test_susi(self):
9898

9999
def test_search(self):
100100
"""test search result"""
101-
result = self.loklak.search('doctor who')
101+
result = self.loklak.search('doctor who', count=18)
102102
self.assertTrue('error' in self.loklak.search())
103103
self.assertTrue('statuses' in result)
104104
self.assertTrue(isinstance(result['statuses'], list))
105105
self.assertTrue(len(result['statuses']) >= 1)
106106
self.assertEqual(len(result['statuses']),
107107
int(result['search_metadata']['count']))
108+
self.assertEqual(int(result['search_metadata']['count']), 18)
108109

109110
def test_aggregations(self):
110111
"""test aggregations"""

0 commit comments

Comments
 (0)