Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Mar 1, 2016
1 parent 9435cb2 commit 01cf92d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions run_tests.py
Expand Up @@ -102,6 +102,20 @@ def test_catalog_does_not_find_too_much(self):
ret = list(checker.run())
self.assertEqual(ret, [])

def test_version(self):
file_path = self._given_a_file_in_test_dir(
'from plone import searchResults\n'
'\n'
'searchResults(3)\n'
)
checker = PloneAPIChecker(None, file_path)
ret = list(checker.run())
self.assertEqual(len(ret), 1)
self.assertEqual(ret[0][0], 3)
self.assertEqual(ret[0][1], 0)
self.assertTrue(ret[0][2].startswith('P001 found '))
self.assertIn('1.3.3', ret[0][2])


if __name__ == '__main__':
unittest.main()

0 comments on commit 01cf92d

Please sign in to comment.