Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
more filth.
Browse files Browse the repository at this point in the history
  • Loading branch information
blairboy362 committed Aug 29, 2018
1 parent df1a9dd commit 9fc200b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/core/storage/test_storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import re

from freezegun import freeze_time
from hamcrest import assert_that, is_, less_than, contains, has_entries, \
Expand Down Expand Up @@ -156,6 +157,16 @@ def test_query_with_filter(self):
contains(
has_entry('foo', 'bar')))

def test_query_with_filter_prefix(self):
self._save_all('foo_bar', {'_id': 'test_id_8', 'foo': 'bar'}, {'_id': 'test_id_9', 'foo': 'foo'})

results = self.engine.execute_query('foo_bar', Query.create(
filter_by_prefix=[('foo', re.compile('^ba.*'))]))

assert_that(results,
contains(
has_entry('foo', 'bar')))

def test_basic_query_with_time_limits(self):
self._save_all('foo_bar',
{'_id': 'test_id_10', '_timestamp': d_tz(2012, 12, 12)},
Expand Down

0 comments on commit 9fc200b

Please sign in to comment.