diff options
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index b1fc8c5..a1dc161 100644 --- a/tests/conftest.py +++ b/tests/conftest.py | |||
@@ -1,19 +1,23 @@ | |||
1 | import pytest | 1 | import pytest |
2 | 2 | ||
3 | def _api(access_token='__MASTODON_PY_TEST_ACCESS_TOKEN'): | 3 | def _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.3.0") | 10 | mastodon_version=version, |
11 | version_check_mode=version_check_mode) | ||
11 | 12 | ||
12 | 13 | ||
13 | @pytest.fixture | 14 | @pytest.fixture |
14 | def api(): | 15 | def api(): |
15 | return _api() | 16 | return _api() |
16 | 17 | ||
18 | @pytest.fixture | ||
19 | def api_low_version(): | ||
20 | return _api(version="1.2.0", version_check_mode="changed") | ||
17 | 21 | ||
18 | @pytest.fixture | 22 | @pytest.fixture |
19 | def api2(): | 23 | def api2(): |