# schema_salad.tests.test_fetch

## Classes

`testFetcher` | Fetch resources from URIs.
`CWLTestFetcher` | Fetch resources from URIs.

## Functions

`test_fetcher`() |
`test_cache`() |

## Module Contents

class schema_salad.tests.test_fetch.testFetcher(cache, session)

  Bases: `schema_salad.fetcher.Fetcher`

  Fetch resources from URIs.

  Parameters:

    - cache (schema_salad.utils.CacheType)

    - session (Optional[requests.sessions.Session])

  fetch_text(url, content_types=None)

    Retrieve the given resource as a string.

    Parameters:

      - url (str)

      - content_types (Optional[list[str]])

    Return type:

      str

  check_exists(url)

    Check if the given resource exists.

    Parameters:

      url (str)

    Return type:

      bool

  urljoin(base, url)

    Construct a full (“absolute”) URL by combining a “base URL” with another URL.

    Parameters:

      - base (str)

      - url (str)

    Return type:

      str

class schema_salad.tests.test_fetch.CWLTestFetcher(cache, session)

  Bases: `schema_salad.fetcher.Fetcher`

  Fetch resources from URIs.

  Parameters:

    - cache (schema_salad.utils.CacheType)

    - session (Optional[requests.sessions.Session])

  fetch_text(url, content_types=None)

    Retrieve the given resource as a string.

    Parameters:

      - url (str)

      - content_types (Optional[list[str]])

    Return type:

      str

  check_exists(url)

    Check if the given resource exists.

    Parameters:

      url (str)

    Return type:

      bool

  urljoin(base, url)

    Construct a full (“absolute”) URL by combining a “base URL” with another URL.

    Parameters:

      - base (str)

      - url (str)

    Return type:

      str

schema_salad.tests.test_fetch.test_fetcher()
  Return type:

    None

schema_salad.tests.test_fetch.test_cache()
  Return type:

    None