Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ihabunek committed Aug 28, 2021
1 parent 9e046b6 commit 54ceefc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 54ceefc

Please sign in to comment.