def test_only_username_in_url(url):
    """
    https://github.com/httpie/cli/issues/242

    """
    args = httpie.cli.definition.parser.parse_args(args=[url], env=MockEnvironment())
    assert args.auth
    assert args.auth.username == 'username'
    assert args.auth.password == ''

    https://github.com/httpie/cli/issues/242

    
tests/test_auth.py