def test_cli_access_token_err(mocker):
    mocker.patch('solarforecastarbiter.io.api.request_cli_access_token',
                 side_effect=requests.HTTPError)
    with pytest.raises(SystemExit):
        cli.cli_access_token('user', 'pass')
def test_cli_access_token(cli_token):
    token = cli.cli_access_token('user', 'pass')
    assert token == 'TOKEN'