aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-05-06 15:55:32 +0200
committerGitHub <[email protected]>2018-05-06 15:55:32 +0200
commitca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d (patch)
tree98328e8776447334b19592992016d9b7f16ae98b /tests/conftest.py
parent06e32c14bcb5a1ef1a5e618a1b413ea011416c9d (diff)
parentfbd4122fec092bff6b1cc9f44dfeda6ee693c41b (diff)
downloadmastodon.py-ca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d.tar.gz
Merge branch 'master' into stream-timeout
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 4ca1856..a1dc161 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,19 +1,23 @@
1import pytest 1import pytest
2 2
3def _api(access_token='__MASTODON_PY_TEST_ACCESS_TOKEN'): 3def _api(access_token='__MASTODON_PY_TEST_ACCESS_TOKEN', version="2.3.0", version_check_mode="created"):
4 import mastodon 4 import mastodon
5 return mastodon.Mastodon( 5 return mastodon.Mastodon(
6 api_base_url='http://localhost:3000', 6 api_base_url='http://localhost:3000',
7 client_id='__MASTODON_PY_TEST_CLIENT_ID', 7 client_id='__MASTODON_PY_TEST_CLIENT_ID',
8 client_secret='__MASTODON_PY_TEST_CLIENT_SECRET', 8 client_secret='__MASTODON_PY_TEST_CLIENT_SECRET',
9 access_token=access_token, 9 access_token=access_token,
10 mastodon_version="2.1.0") 10 mastodon_version=version,
11 version_check_mode=version_check_mode)
11 12
12 13
13@pytest.fixture 14@pytest.fixture
14def api(): 15def api():
15 return _api() 16 return _api()
16 17
18@pytest.fixture
19def api_low_version():
20 return _api(version="1.2.0", version_check_mode="changed")
17 21
18@pytest.fixture 22@pytest.fixture
19def api2(): 23def api2():
Powered by cgit v1.2.3 (git 2.41.0)