1
0
mirror of https://github.com/httpie/cli.git synced 2026-04-26 20:02:11 +02:00

More tests.

This commit is contained in:
Jakub Roztocil
2014-04-24 19:32:39 +02:00
parent ce2169f4fe
commit e5d758e4ce
3 changed files with 8 additions and 14 deletions
-10
View File
@@ -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:
+5
View File
@@ -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