diff --git a/tests/access.credentials b/tests/access.credentials deleted file mode 100644 index 7601807..0000000 --- a/tests/access.credentials +++ /dev/null @@ -1 +0,0 @@ -baz diff --git a/tests/client.credentials b/tests/client.credentials deleted file mode 100644 index 3bd1f0e..0000000 --- a/tests/client.credentials +++ /dev/null @@ -1,2 +0,0 @@ -foo -bar diff --git a/tests/test_constructor.py b/tests/test_constructor.py index fac3763..a599df6 100644 --- a/tests/test_constructor.py +++ b/tests/test_constructor.py @@ -2,10 +2,14 @@ import pytest from mastodon import Mastodon from mastodon.Mastodon import MastodonIllegalArgumentError -def test_constructor_from_filenames(): +def test_constructor_from_filenames(tmpdir): + client = tmpdir.join('client') + client.write_text('foo\nbar\n', 'UTF-8') + access = tmpdir.join('access') + access.write_text('baz\n', 'UTF-8') api = Mastodon( - 'tests/client.credentials', - access_token = 'tests/access.credentials') + str(client), + access_token = str(access)) assert api.client_id == 'foo' assert api.client_secret == 'bar' assert api.access_token == 'baz'