|
|
@ -19,7 +19,6 @@ from httmock import urlmatch, response, HTTMock, all_requests |
|
|
|
|
|
|
|
from ..connection import ConnectionManager |
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
|
import unittest |
|
|
|
except ImportError: |
|
|
@ -47,7 +46,6 @@ class TestConnection(unittest.TestCase): |
|
|
|
self.assertEqual(resp.status_code, 200) |
|
|
|
|
|
|
|
def test_raw_post(self): |
|
|
|
|
|
|
|
@urlmatch(path="/known_path", method="post") |
|
|
|
def response_post_success(url, request): |
|
|
|
headers = {'content-type': 'application/json'} |
|
|
@ -74,7 +72,6 @@ class TestConnection(unittest.TestCase): |
|
|
|
self.assertEqual(resp.status_code, 200) |
|
|
|
|
|
|
|
def test_raw_get_fail(self): |
|
|
|
|
|
|
|
@urlmatch(netloc="localhost", path="/known_path", method="get") |
|
|
|
def response_get_fail(url, request): |
|
|
|
headers = {'content-type': 'application/json'} |
|
|
@ -88,7 +85,6 @@ class TestConnection(unittest.TestCase): |
|
|
|
self.assertEqual(resp.status_code, 404) |
|
|
|
|
|
|
|
def test_raw_post_fail(self): |
|
|
|
|
|
|
|
@urlmatch(netloc="localhost", path="/known_path", method="post") |
|
|
|
def response_post_fail(url, request): |
|
|
|
headers = {'content-type': 'application/json'} |
|
|
@ -102,7 +98,6 @@ class TestConnection(unittest.TestCase): |
|
|
|
self.assertEqual(resp.status_code, 404) |
|
|
|
|
|
|
|
def test_raw_put_fail(self): |
|
|
|
|
|
|
|
@urlmatch(netloc="localhost", path="/known_path", method="put") |
|
|
|
def response_put_fail(url, request): |
|
|
|
headers = {'content-type': 'application/json'} |
|
|
|