Blob Blame History Raw
From 80c6f7c29a22e176eb58845569e730f9b89ab64d Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 16 Nov 2017 11:36:42 -0800
Subject: [PATCH] Revert "Fix test compat with responses@0.6.0"

This reverts commit 1650e0e77d370ff5d7b089b60353854d548fb0a1.
Upstream restored handling of the adding_headers arg in 0.6.1.
Going back to using that name means we're still compatible with
any version of responses after 0.3.0, except 0.6.0. Also adjust
setup.py to express this correctly.
---
 setup.py             | 2 +-
 tests/test_client.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index eca6c49..a32cbde 100644
--- a/setup.py
+++ b/setup.py
@@ -29,6 +29,6 @@ setup(name='mwclient',
       install_requires=['requests_oauthlib', 'six'],
       setup_requires=['pytest-runner'],
       tests_require=['pytest', 'pytest-pep8', 'pytest-cache', 'pytest-cov',
-                     'responses>=0.6.0', 'mock'],
+                     'responses>=0.3.0', 'responses!=0.6.0', 'mock'],
       zip_safe=True
       )
diff --git a/tests/test_client.py b/tests/test_client.py
index 3a074e2..e497803 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -52,7 +52,7 @@ class TestCase(unittest.TestCase):
             responses.add_callback(mock, url, callback=callback)
         else:
             responses.add(mock, url, body=body, content_type='application/json',
-                          headers=headers, status=status)
+                          adding_headers=headers, status=status)
 
     def stdSetup(self):
         self.httpShouldReturn(self.metaResponseAsJson())
-- 
2.14.3