Skip to content
Snippets Groups Projects
conftest.py 516 B
Newer Older
Nico's avatar
Nico committed
# Copyright (c) 2019 Nico Alt
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md

import pytest

# pylint: disable=redefined-outer-name


@pytest.fixture
Nico's avatar
Nico committed
def api(auth_token, mocker):
    api = mocker.Mock()
Nico's avatar
Nico committed
    api.auth_token = auth_token
    return api


@pytest.fixture
def auth_token():
    return 'NMDArEDjYlagINGd77WkKdxqDUAkYCWwh'
Nico's avatar
Nico committed


@pytest.fixture
def request_headers(auth_token):
    request_headers = {
        "Authorization": 'Bearer %s' % auth_token
Nico's avatar
Nico committed
    }
Nico's avatar
Nico committed
    return request_headers