1
0
mirror of https://github.com/httpie/cli.git synced 2024-11-24 08:22:22 +02:00

Use local httpbin for all tests if available.

This commit is contained in:
Jakub Roztocil 2012-07-21 13:28:59 +02:00
parent 35da44309f
commit 19f760450f
2 changed files with 10 additions and 10 deletions

View File

@ -46,7 +46,7 @@ Or, you can install the **development version** directly from GitHub:
There are packages available for
`Ubuntu <http://packages.ubuntu.com/httpie>`_,
`Debian <http://packages.debian.org/httpie>`_ and
other possibly other major distros as well.
possibly other major distros as well.
Usage

View File

@ -15,14 +15,14 @@ To make it run faster and offline you can::
HTTPBIN_URL=http://localhost:5000 python setup.py test
"""
import unittest
import argparse
import os
import sys
import tempfile
import json
from requests.compat import is_py26, is_py3
import tempfile
import unittest
import argparse
from requests import Response
from requests.compat import is_py26, is_py3
#################################################################
@ -263,7 +263,7 @@ class AutoContentTypeAndAcceptHeadersTest(BaseTestCase):
r = http(
'GET',
'httpbin.org/get',
httpbin('/get'),
env=Environment(stdout_isatty=False)
)
self.assertNotIn('HTTP/', r)
@ -273,7 +273,7 @@ class AutoContentTypeAndAcceptHeadersTest(BaseTestCase):
r = http(
'--print=h',
'GET',
'httpbin.org/get',
httpbin('/get'),
env=Environment(stdout_isatty=False)
)
self.assertIn('HTTP/1.1 200', r)
@ -460,7 +460,7 @@ class AuthTest(BaseTestCase):
'--auth',
'user:password',
'GET',
'httpbin.org/basic-auth/user/password'
httpbin('/basic-auth/user/password')
)
self.assertIn('HTTP/1.1 200', r)
self.assertIn('"authenticated": true', r)
@ -472,7 +472,7 @@ class AuthTest(BaseTestCase):
'--auth',
'user:password',
'GET',
'httpbin.org/digest-auth/auth/user/password'
httpbin('/digest-auth/auth/user/password')
)
self.assertIn('HTTP/1.1 200', r)
self.assertIn('"authenticated": true', r)
@ -486,7 +486,7 @@ class AuthTest(BaseTestCase):
'--auth',
'user',
'GET',
'httpbin.org/basic-auth/user/password'
httpbin('/basic-auth/user/password')
)
self.assertIn('HTTP/1.1 200', r)