from __future__ import with_statement
-import unittest
+import time
import cookielib
+import unittest
+
+import envoy
try:
import omnijson as json
from requests.sessions import Session
-HTTPBIN_URL = 'http://127.0.0.1:44444/'
+HTTPBIN_URL = 'http://0.0.0.0:7045/'
+# HTTPBIN_URL = 'http://127.0.0.1:8000/'
def httpbin(*suffix):
global _httpbin
if not _httpbin:
- import envoy
- self.httpbin = envoy.connect('httpbin 44444')
- # print self.httpbin
- _httpbin = True
- # print '!'/
+ self.httpbin = envoy.connect('gunicorn httpbin:app --bind=0.0.0.0:7045')
- import time
+ _httpbin = True
time.sleep(1)
def test_HTTP_200_OK_PATCH(self):
r = requests.patch(httpbin('patch'))
+ print r.__dict__
+ print r.content
+ print r.url
self.assertEqual(r.status_code, 200)