You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-06-27 00:51:16 +02:00
Implement new style cookies
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from httpie.status import ExitStatus
|
||||
from tests.utils import httpie
|
||||
from tests.utils.plugins_cli import parse_listing
|
||||
|
||||
|
||||
@ -149,45 +148,3 @@ def test_broken_plugins(httpie_plugins, httpie_plugins_success, dummy_plugin, br
|
||||
# No warning now, since it is uninstalled.
|
||||
data = parse_listing(httpie_plugins_success('list'))
|
||||
assert len(data) == 1
|
||||
|
||||
|
||||
@pytest.mark.requires_installation
|
||||
def test_plugins_cli_error_message_without_args():
|
||||
# No arguments
|
||||
result = httpie(no_debug=True)
|
||||
assert result.exit_status == ExitStatus.ERROR
|
||||
assert 'usage: ' in result.stderr
|
||||
assert 'specify one of these' in result.stderr
|
||||
assert 'please use the http/https commands:' in result.stderr
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'example', [
|
||||
'pie.dev/get',
|
||||
'DELETE localhost:8000/delete',
|
||||
'POST pie.dev/post header:value a=b header_2:value x:=1'
|
||||
]
|
||||
)
|
||||
@pytest.mark.requires_installation
|
||||
def test_plugins_cli_error_messages_with_example(example):
|
||||
result = httpie(*example.split(), no_debug=True)
|
||||
assert result.exit_status == ExitStatus.ERROR
|
||||
assert 'usage: ' in result.stderr
|
||||
assert f'http {example}' in result.stderr
|
||||
assert f'https {example}' in result.stderr
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'example', [
|
||||
'plugins unknown',
|
||||
'plugins unknown.com A:B c=d',
|
||||
'unknown.com UNPARSABLE????SYNTAX',
|
||||
]
|
||||
)
|
||||
@pytest.mark.requires_installation
|
||||
def test_plugins_cli_error_messages_invalid_example(example):
|
||||
result = httpie(*example.split(), no_debug=True)
|
||||
assert result.exit_status == ExitStatus.ERROR
|
||||
assert 'usage: ' in result.stderr
|
||||
assert f'http {example}' not in result.stderr
|
||||
assert f'https {example}' not in result.stderr
|
||||
|
Reference in New Issue
Block a user