Fix tests

This commit is contained in:
Ivan Habunek 2023-03-30 12:09:38 +02:00
parent 2166918da2
commit c659ed7a5d
No known key found for this signature in database
GPG key ID: CDBD63C43A30BB95
2 changed files with 3 additions and 2 deletions

View file

@ -46,7 +46,7 @@ def test_reblog(app, user, run):
assert status["reblogged"]
out = run("reblogged_by", status["id"])
assert out == f"@{user.username}"
assert user.username in out
out = run("unreblog", status["id"])
assert out == "✓ Status unreblogged"

View file

@ -177,7 +177,7 @@ def test_timeline_with_re(mock_get, monkeypatch, capsys):
mock_get.assert_called_once_with(app, user, '/api/v1/timelines/home', {'limit': 10})
out, err = capsys.readouterr()
lines = out.split("\n")
lines = uncolorize(out).split("\n")
assert "Frank Zappa" in lines[1]
assert "@fz" in lines[1]
@ -349,6 +349,7 @@ def test_search(mock_get, capsys):
})
out, err = capsys.readouterr()
out = uncolorize(out)
assert "Hashtags:\n#foo, #bar, #baz" in out
assert "Accounts:" in out
assert "@thequeen Freddy Mercury" in out