mirror of
https://github.com/ihabunek/toot.git
synced 2024-11-03 04:17:21 -05:00
Fix tests
This commit is contained in:
parent
9e046b6d86
commit
54ceefccdc
@ -41,11 +41,12 @@ def test_post_defaults(mock_post, mock_uuid, capsys):
|
||||
mock_post.assert_called_once_with(app, user, '/api/v1/statuses', {
|
||||
'status': 'Hello world',
|
||||
'visibility': 'public',
|
||||
'media_ids[]': None,
|
||||
'media_ids[]': [],
|
||||
'sensitive': "false",
|
||||
'spoiler_text': None,
|
||||
'in_reply_to_id': None,
|
||||
'language': None,
|
||||
'scheduled_at': None,
|
||||
}, headers={"Idempotency-Key": "rock-on"})
|
||||
|
||||
out, err = capsys.readouterr()
|
||||
@ -75,12 +76,13 @@ def test_post_with_options(mock_post, mock_uuid, capsys):
|
||||
|
||||
mock_post.assert_called_once_with(app, user, '/api/v1/statuses', {
|
||||
'status': 'Hello world',
|
||||
'media_ids[]': None,
|
||||
'media_ids[]': [],
|
||||
'visibility': 'unlisted',
|
||||
'sensitive': "true",
|
||||
'spoiler_text': "Spoiler!",
|
||||
'in_reply_to_id': '123a',
|
||||
'language': 'hrv',
|
||||
'scheduled_at': None,
|
||||
}, headers={"Idempotency-Key": "up-the-irons"})
|
||||
|
||||
out, err = capsys.readouterr()
|
||||
@ -529,7 +531,7 @@ def test_notifications(mock_get, capsys):
|
||||
|
||||
console.run_command(app, user, 'notifications', [])
|
||||
|
||||
mock_get.assert_called_once_with(app, user, '/api/v1/notifications')
|
||||
mock_get.assert_called_once_with(app, user, '/api/v1/notifications', {'exclude_types[]': [], 'limit': 20})
|
||||
|
||||
out, err = capsys.readouterr()
|
||||
out = uncolorize(out)
|
||||
@ -571,7 +573,7 @@ def test_notifications_empty(mock_get, capsys):
|
||||
|
||||
console.run_command(app, user, 'notifications', [])
|
||||
|
||||
mock_get.assert_called_once_with(app, user, '/api/v1/notifications')
|
||||
mock_get.assert_called_once_with(app, user, '/api/v1/notifications', {'exclude_types[]': [], 'limit': 20})
|
||||
|
||||
out, err = capsys.readouterr()
|
||||
out = uncolorize(out)
|
||||
|
Loading…
Reference in New Issue
Block a user