diff options
author | codl <[email protected]> | 2017-11-27 04:22:03 +0100 |
---|---|---|
committer | codl <[email protected]> | 2017-11-27 14:20:31 +0100 |
commit | 765db0fc8149aad4c103244e013fdd128af8d3d2 (patch) | |
tree | e8c590492f114e024135ed8584bcab7276e8a1f9 | |
parent | d09d27cdd25a6277333b65953d546bd281e380da (diff) | |
download | mastodon.py-765db0fc8149aad4c103244e013fdd128af8d3d2.tar.gz |
move fixtures.py to standardized location conftest.py
-rw-r--r-- | tests/conftest.py (renamed from tests/fixtures.py) | 3 | ||||
-rw-r--r-- | tests/test_hooks.py | 2 | ||||
-rw-r--r-- | tests/test_instance.py | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/tests/fixtures.py b/tests/conftest.py index 1b32866..1858ab8 100644 --- a/tests/fixtures.py +++ b/tests/conftest.py | |||
@@ -9,14 +9,13 @@ def mastodon(): | |||
9 | client_secret='__MASTODON_PY_TEST_SECRET', | 9 | client_secret='__MASTODON_PY_TEST_SECRET', |
10 | access_token='__MASTODON_PY_TEST_TOKEN') | 10 | access_token='__MASTODON_PY_TEST_TOKEN') |
11 | 11 | ||
12 | |||
13 | |||
14 | @pytest.fixture() | 12 | @pytest.fixture() |
15 | def status(mastodon): | 13 | def status(mastodon): |
16 | _status = mastodon.status_post('Toot!') | 14 | _status = mastodon.status_post('Toot!') |
17 | yield _status | 15 | yield _status |
18 | mastodon.status_delete(_status['id']) | 16 | mastodon.status_delete(_status['id']) |
19 | 17 | ||
18 | |||
20 | @pytest.fixture() | 19 | @pytest.fixture() |
21 | def vcr_config(): | 20 | def vcr_config(): |
22 | return dict( | 21 | return dict( |
diff --git a/tests/test_hooks.py b/tests/test_hooks.py index fe242a6..132021b 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py | |||
@@ -1,4 +1,4 @@ | |||
1 | from .fixtures import * | 1 | import pytest |
2 | from datetime import datetime | 2 | from datetime import datetime |
3 | 3 | ||
4 | @pytest.mark.vcr() | 4 | @pytest.mark.vcr() |
diff --git a/tests/test_instance.py b/tests/test_instance.py index d6f1bed..3ea3cf1 100644 --- a/tests/test_instance.py +++ b/tests/test_instance.py | |||
@@ -1,4 +1,3 @@ | |||
1 | from .fixtures import * | ||
2 | import pytest | 1 | import pytest |
3 | 2 | ||
4 | @pytest.mark.vcr() | 3 | @pytest.mark.vcr() |