1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-14 15:53:28 +01:00
pywb/tests_disabled/test_perms.py
Ilya Kreymer a4b770d34e new-pywb refactor!
frontendapp compatibility
- add support for separate not found page for 404s (not_found.html)
- support for exception handling with error template (error.html)
- support for home page (index.html)
- add memento headers for replay
- add referrer fallback check
- tests: port integration tests for front-end replay, cdx server
- not included: proxy mode, exact redirect mode, non-framed replay
- move unused tests to tests_disabled
- cli: add optional werkzeug profiler with --profile flag
2017-02-27 19:07:51 -08:00

28 lines
852 B
Python

from pywb.cdx.cdxops import cdx_load
from pywb.cdx.query import CDXQuery
from pywb.cdx.cdxserver import CDXServer
from pywb.utils.wbexception import AccessException
from pywb.webapp.query_handler import QueryHandler
from pytest import raises
from tests.fixture import testconfig
#================================================================
def test_excluded(testconfig):
#sources = testconfig.get('index_paths')
#perms_policy = testconfig.get('perms_policy')
#cdx_server = CDXServer(sources)
#index_handler = IndexHandler(cdx_server, perms_policy=perms_policy)
query_handler = QueryHandler.init_from_config(testconfig)
url = 'http://www.iana.org/_img/bookmark_icon.ico'
params = dict(url=url)
with raises(AccessException):
cdxobjs = list(query_handler.load_cdx(None, params))
print(cdxobjs)