diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index fea6477..8e3f3be 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -14,10 +14,11 @@ export TOOT_TEST_DATABASE_DSN="dbname=mastodon_development" """ import json -import re import os import psycopg2 import pytest +import re +import typing as t import uuid from click.testing import CliRunner, Result @@ -31,6 +32,9 @@ def pytest_configure(config): toot.settings.DISABLE_SETTINGS = True +# Type alias for run commands +Run = t.Callable[..., Result] + # Mastodon database name, used to confirm user registration without having to click the link DATABASE_DSN = os.getenv("TOOT_TEST_DATABASE_DSN") TOOT_TEST_BASE_URL = os.getenv("TOOT_TEST_BASE_URL") diff --git a/tests/integration/test_auth.py b/tests/integration/test_auth.py index 858d6fb..74db83b 100644 --- a/tests/integration/test_auth.py +++ b/tests/integration/test_auth.py @@ -3,7 +3,7 @@ from unittest import mock from unittest.mock import MagicMock from toot import User, cli -from toot.cli import Run +from tests.integration.conftest import Run # TODO: figure out how to test login diff --git a/toot/cli/__init__.py b/toot/cli/__init__.py index 92abbc9..5ebd196 100644 --- a/toot/cli/__init__.py +++ b/toot/cli/__init__.py @@ -39,10 +39,6 @@ DURATION_EXAMPLES = """e.g. "1 day", "2 hours 30 minutes", "5 minutes 30 seconds" or any combination of above. Shorthand: "1d", "2h30m", "5m30s\"""" -# Type alias for run commands -Run = t.Callable[..., Result] - - def get_default_visibility() -> str: return os.getenv("TOOT_POST_VISIBILITY", "public")