mementoweb.validator.pipelines package

Submodules

mementoweb.validator.pipelines.default module

class mementoweb.validator.pipelines.default.DefaultPipeline

Bases: object

name() str
result: mementoweb.validator.pipelines.default.PipelineResult
validate(uri: str, datetime='Thu, 10 Oct 2009 12:00:00 GMT', accept='') mementoweb.validator.pipelines.default.PipelineResult
class mementoweb.validator.pipelines.default.PipelineResult

Bases: object

mementos: List[str]
reports: List[mementoweb.validator.tests.test.TestReport]
timegates: List[str]
timemaps: List[str]
to_json()

mementoweb.validator.pipelines.memento module

class mementoweb.validator.pipelines.memento.Memento

Bases: mementoweb.validator.pipelines.default.DefaultPipeline

result: mementoweb.validator.pipelines.default.PipelineResult
validate(uri: str, datetime='Thu, 10 Oct 2009 12:00:00 GMT', accept='') mementoweb.validator.pipelines.default.PipelineResult

Test sequence for Memento resource type. Steps

  1. Check the validity of the URI

    Checks the URI compliance with standard format and by establishing connection

  2. Check redirection

    Check the response status of connection by performing redirection (status 3xx)

  3. Check content negotiation

    Check for memento datetime header

  4. Link header tests

Parameters
  • uri – URI of the memento

  • datetime

  • accept

Returns

Test reports

mementoweb.validator.pipelines.original module

class mementoweb.validator.pipelines.original.Original

Bases: mementoweb.validator.pipelines.default.DefaultPipeline

result: mementoweb.validator.pipelines.default.PipelineResult
validate(uri: str, datetime='Thu, 10 Oct 2009 12:00:00 GMT', accept='') mementoweb.validator.pipelines.default.PipelineResult

mementoweb.validator.pipelines.timebundle module

class mementoweb.validator.pipelines.timebundle.TimeBundle

Bases: mementoweb.validator.pipelines.default.DefaultPipeline

result: mementoweb.validator.pipelines.default.PipelineResult
validate(uri: str, datetime='Thu, 10 Oct 2009 12:00:00 GMT', accept='') List[mementoweb.validator.tests.test.TestReport]

mementoweb.validator.pipelines.timegate module

class mementoweb.validator.pipelines.timegate.TimeGate

Bases: mementoweb.validator.pipelines.default.DefaultPipeline

result: mementoweb.validator.pipelines.default.PipelineResult
validate(uri: str, datetime='Thu, 10 Oct 2009 12:00:00 GMT', accept='', past_datetime='Mon, 03 Feb 1992 00:00:00 GMT', future_datetime='Tue, 03 Feb 2032 00:00:00 GMT') mementoweb.validator.pipelines.default.PipelineResult

Tests the memento implementation of a timegate resource. Steps

  1. Check the validity of the URI by compliance with the format and the establishing a connection.

  2. Check redirection and response status for the request. Redirected while the status is 3xx and not vary.

  3. Test the header of the response for “Location”, “Content Location”, “Vary”, “Accept Datetime”.

  4. Test content in link headers.

  5. Test redirection for different datetime combinations.

Parameters
  • uri – URI of the timegate for testing.

  • datetime – Datetime for testing the timegate. Timegate is queries using the datetime provided.

  • accept

  • past_datetime – Past datetime to test redirection of the timegate. Defaults to “Mon, 03 Feb 1992 00:00:00 GMT”

  • future_datetime – Future datetime to test redirection of the timegate. Defaults to “Tue, 03 Feb 2032 00:00:00 GMT”

Returns

mementoweb.validator.pipelines.timemap module

class mementoweb.validator.pipelines.timemap.TimeMap

Bases: mementoweb.validator.pipelines.default.DefaultPipeline

result: mementoweb.validator.pipelines.default.PipelineResult
validate(uri: str, datetime='Thu, 10 Oct 2009 12:00:00 GMT', accept='', full: bool = False) mementoweb.validator.pipelines.default.PipelineResult

Module contents