Пример #1
0
 def test_search_swamid(self):
     store = RedisWhooshStore(directory=self.dir, clear=True, name="test", redis=fakeredis.FakeStrictRedis())
     store.update(self.swamid, etag='test01', lazy=False)
     for q in ('sunet', 'sunet.se', 'nordunet', 'miun'):
         e = list(store.search(q))
         assert len(e) != 0
         assert e[0] is not None
         assert e[0].get('entityID') is not None
Пример #2
0
 def test_search_test01(self):
     store = RedisWhooshStore(directory=self.dir, clear=True, name="test", redis=fakeredis.FakeStrictRedis())
     store.update(self.test01, etag='test01', lazy=False)
     entity_id = root(self.test01).get('entityID')
     for q in ('example', 'Example', 'university'):
         e = list(store.search(q))
         assert len(e) == 1
         assert e[0] is not None
         assert e[0].get('entityID') is not None
         assert e[0].get('entityID') == entity_id