summaryrefslogtreecommitdiff
path: root/testing/tests/conftest.py
blob: 9e4319ac7c245513558b426854c3d022303dcdbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pytest


def pytest_addoption(parser):
    parser.addoption(
        "--couch-url", type="string", default="http://127.0.0.1:5984",
        help="the url for the couch server to be used during tests")


@pytest.fixture
def couch_url(request):
    url = request.config.getoption('--couch-url')
    request.cls.couch_url = url


@pytest.fixture
def method_tmpdir(request, tmpdir):
    request.instance.tempdir = tmpdir.strpath