def test_check_auth_with_invalid_auth_token(mocker):
    mocker.patch('app.utils.authentication.get_token_from_headers', return_value='invalid')
    abort = mocker.patch('app.utils.authentication.abort')

    check_auth()

    abort.assert_called_once_with(403, mock.ANY)
def test_check_auth(mocker):
    mocker.patch('app.utils.authentication.get_token_from_headers', return_value='test-token')
    abort = mocker.patch('app.utils.authentication.abort')

    check_auth()

    assert not abort.called