1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-06-23 06:25:26 +00:00

Compare commits

..

No commits in common. "1d48e6485359df24a9f52610d8b66565b54e869f" and "4b17e2e586970894adf5d30fc897c91a49e19eb9" have entirely different histories.

3 changed files with 4 additions and 8 deletions

View File

@ -41,8 +41,6 @@ TRUMPET = str(Path(__file__).parent.parent.parent / "trumpet.png")
ASSETS_DIR = str(Path(__file__).parent.parent / "assets")
PASSWORD = "83dU29170rjKilKQQwuWhJv3PKnSW59bWx0perjP6i7Nu4rkeh4mRfYuvVLYM3fM"
def create_app(base_url):
instance = api.get_instance(base_url).json()
@ -54,7 +52,7 @@ def register_account(app: App):
username = str(uuid.uuid4())[-10:]
email = f"{username}@example.com"
response = api.register_account(app, username, email, PASSWORD, "en")
response = api.register_account(app, username, email, "password", "en")
return User(app.instance, username, response["access_token"])

View File

@ -3,7 +3,7 @@ from unittest import mock
from unittest.mock import MagicMock
from toot import User, cli
from tests.integration.conftest import PASSWORD, Run
from tests.integration.conftest import Run
# TODO: figure out how to test login
@ -89,7 +89,7 @@ def test_login_cli(
cli.auth.login_cli,
"--instance", "http://localhost:3000",
"--email", f"{user.username}@example.com",
"--password", PASSWORD,
"--password", "password",
)
assert result.exit_code == 0
assert "✓ Successfully logged in." in result.stdout

View File

@ -327,10 +327,8 @@ class TUI(urwid.Frame):
# get the major version number of the server
# this works for Mastodon and Pleroma version strings
# Mastodon versions < 4 do not have translation service
# If the version is missing, assume 0 as a fallback
# Revisit this logic if Pleroma implements translation
version = instance["version"]
ch = "0" if not version else version[0]
ch = instance["version"][0]
self.can_translate = int(ch) > 3 if ch.isnumeric() else False
return self.run_in_thread(_load_instance, done_callback=_done)