You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2026-04-26 20:02:11 +02:00
More tests.
This commit is contained in:
@@ -107,16 +107,6 @@ def http(*args, **kwargs):
|
||||
>>> r.json is None
|
||||
True
|
||||
|
||||
$ http --version:
|
||||
|
||||
>>> r = http('--version')
|
||||
>>> r.exit_status
|
||||
1
|
||||
>>> r.stderr.strip() == httpie.__version__
|
||||
True
|
||||
>>> r == ''
|
||||
True
|
||||
|
||||
"""
|
||||
env = kwargs.get('env')
|
||||
if not env:
|
||||
|
||||
@@ -19,6 +19,11 @@ class HTTPieTest(TestCase):
|
||||
assert r.exit_status == httpie.ExitStatus.ERROR
|
||||
assert 'https://github.com/jkbr/httpie/issues' in r
|
||||
|
||||
def test_version(self):
|
||||
r = http('--version')
|
||||
assert r.exit_status == httpie.ExitStatus.ERROR
|
||||
assert httpie.__version__ == r.stderr.strip()
|
||||
|
||||
def test_GET(self):
|
||||
r = http('GET', httpbin('/get'))
|
||||
assert HTTP_OK in r
|
||||
|
||||
Reference in New Issue
Block a user