コード例 #1
0
ファイル: test_store.py プロジェクト: clarin-eric/pyFF
 def test_store_attributes_test01(self):
     store = RedisWhooshStore(directory=self.dir, clear=True, name="test", redis=fakeredis.FakeStrictRedis())
     store.update(self.test01, etag='test01', lazy=False)
     print(store.attributes())
     assert ATTRS['domain'] in store.attributes()
     assert ATTRS['role'] in store.attributes()
     assert ATTRS['collection'] not in store.attributes()
     assert 'example.com' in store.attribute(ATTRS['domain'])
     assert 'example.net' in store.attribute(ATTRS['domain'])
     assert 'foo.com' not in store.attribute(ATTRS['domain'])
コード例 #2
0
ファイル: test_store.py プロジェクト: clarin-eric/pyFF
 def test_create_store(self):
     store = RedisWhooshStore(directory=self.dir, clear=True, name="test", redis=fakeredis.FakeStrictRedis())
     assert store is not None
     assert store.size() == 0
     assert len(store.collections()) == 0
     assert str(store)
     assert not store.attributes()