Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermendes committed Jul 29, 2018
1 parent 04169a4 commit 07cc047
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,12 @@ def test_search_returns_only_deleted_annotations(self):
def test_search_raises_when_invalid_deleted_value(self):
"""Test search raises ValueError with invalid deleted argumement."""
assert_raises(ValueError, self.search._get_deleted_clause, 'foo')

@with_context
def test_offset(self):
"""Test search with offset."""
size = 5
offset = 2
annotations = AnnotationFactory.create_batch(size)
results = self.search.search(offset=offset)
assert_equal(len(results), size - offset)

0 comments on commit 07cc047

Please sign in to comment.