Hello community,
here is the log from the commit of package python-pytest-responsemock for
openSUSE:Factory checked in at 2020-11-08 20:59:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-responsemock (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-responsemock.new.11331 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-responsemock"
Sun Nov 8 20:59:15 2020 rev:2 rq:846886 version:1.0.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-responsemock/python-pytest-responsemock.changes
2020-08-10 15:08:17.288283033 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-responsemock.new.11331/python-pytest-responsemock.changes
2020-11-08 20:59:21.604283064 +0100
@@ -1,0 +2,6 @@
+Fri Nov 6 09:33:36 UTC 2020 - Marketa Machova <[email protected]>
+
+- Update to 1.0.1
+ * Handle setting 'Content-Type' header correctly.
+
+-------------------------------------------------------------------
Old:
----
pytest-responsemock-1.0.0.tar.gz
New:
----
pytest-responsemock-1.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-responsemock.spec ++++++
--- /var/tmp/diff_new_pack.XLqImZ/_old 2020-11-08 20:59:22.248281815 +0100
+++ /var/tmp/diff_new_pack.XLqImZ/_new 2020-11-08 20:59:22.252281806 +0100
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-responsemock
-Version: 1.0.0
+Version: 1.0.1
Release: 0
Summary: Simplified requests calls mocking for pytest
License: BSD-3-Clause
++++++ pytest-responsemock-1.0.0.tar.gz -> pytest-responsemock-1.0.1.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-responsemock-1.0.0/CHANGELOG
new/pytest-responsemock-1.0.1/CHANGELOG
--- old/pytest-responsemock-1.0.0/CHANGELOG 2020-07-26 11:59:19.000000000
+0200
+++ new/pytest-responsemock-1.0.1/CHANGELOG 2020-10-10 08:54:23.000000000
+0200
@@ -2,6 +2,11 @@
=============================
+v1.0.1 [2020-10-10]
+-------------------
+* Handle setting 'Content-Type' header correctly.
+
+
v1.0.0 [2020-07-26]
-------------------
+ Add support for binary responses.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-responsemock-1.0.0/PKG-INFO
new/pytest-responsemock-1.0.1/PKG-INFO
--- old/pytest-responsemock-1.0.0/PKG-INFO 2020-07-26 11:59:31.000000000
+0200
+++ new/pytest-responsemock-1.0.1/PKG-INFO 2020-10-10 08:55:14.965842500
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-responsemock
-Version: 1.0.0
+Version: 1.0.1
Summary: Simplified requests calls mocking for pytest
Home-page: https://github.com/idlesign/pytest-responsemock
Author: Igor `idle sign` Starikov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-responsemock-1.0.0/pytest_responsemock.egg-info/PKG-INFO
new/pytest-responsemock-1.0.1/pytest_responsemock.egg-info/PKG-INFO
--- old/pytest-responsemock-1.0.0/pytest_responsemock.egg-info/PKG-INFO
2020-07-26 11:59:31.000000000 +0200
+++ new/pytest-responsemock-1.0.1/pytest_responsemock.egg-info/PKG-INFO
2020-10-10 08:55:14.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-responsemock
-Version: 1.0.0
+Version: 1.0.1
Summary: Simplified requests calls mocking for pytest
Home-page: https://github.com/idlesign/pytest-responsemock
Author: Igor `idle sign` Starikov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-responsemock-1.0.0/pytest_responsemock.egg-info/requires.txt
new/pytest-responsemock-1.0.1/pytest_responsemock.egg-info/requires.txt
--- old/pytest-responsemock-1.0.0/pytest_responsemock.egg-info/requires.txt
2020-07-26 11:59:31.000000000 +0200
+++ new/pytest-responsemock-1.0.1/pytest_responsemock.egg-info/requires.txt
2020-10-10 08:55:14.000000000 +0200
@@ -1,2 +1,2 @@
pytest
-responses
+responses>=0.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-responsemock-1.0.0/responsemock/__init__.py
new/pytest-responsemock-1.0.1/responsemock/__init__.py
--- old/pytest-responsemock-1.0.0/responsemock/__init__.py 2020-07-26
11:59:19.000000000 +0200
+++ new/pytest-responsemock-1.0.1/responsemock/__init__.py 2020-10-10
08:54:23.000000000 +0200
@@ -1,6 +1,6 @@
-VERSION = (1, 0, 0)
+VERSION = (1, 0, 1)
"""Application version number tuple."""
VERSION_STR = '.'.join(map(str, VERSION))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-responsemock-1.0.0/responsemock/utils.py
new/pytest-responsemock-1.0.1/responsemock/utils.py
--- old/pytest-responsemock-1.0.0/responsemock/utils.py 2020-07-26
11:56:05.000000000 +0200
+++ new/pytest-responsemock-1.0.1/responsemock/utils.py 2020-10-10
06:44:52.000000000 +0200
@@ -56,7 +56,7 @@
:param kwargs: Additional keyword arguments to pass to `RequestsMock`.
"""
- from responses import RequestsMock
+ from responses import RequestsMock, UNSET
if bypass:
@@ -105,6 +105,8 @@
if val:
headers[dec(key.strip())] = dec(val)
+ content_type = headers.pop('Content-Type', UNSET)
+
directives = list(
filter(
None,
@@ -127,6 +129,7 @@
body=response,
status=status,
adding_headers=headers or None,
+ content_type=content_type,
)
yield mock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-responsemock-1.0.0/setup.py
new/pytest-responsemock-1.0.1/setup.py
--- old/pytest-responsemock-1.0.0/setup.py 2020-07-26 11:58:31.000000000
+0200
+++ new/pytest-responsemock-1.0.1/setup.py 2020-10-10 08:52:30.000000000
+0200
@@ -42,7 +42,7 @@
install_requires=[
'pytest',
- 'responses',
+ 'responses>=0.6.0',
],
setup_requires=[] + (['pytest-runner'] if 'test' in sys.argv else []) + [],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-responsemock-1.0.0/tests/test_module.py
new/pytest-responsemock-1.0.1/tests/test_module.py
--- old/pytest-responsemock-1.0.0/tests/test_module.py 2020-07-26
11:56:05.000000000 +0200
+++ new/pytest-responsemock-1.0.1/tests/test_module.py 2020-10-10
06:42:23.000000000 +0200
@@ -33,7 +33,7 @@
with response_mock('''
GET http://yandex.ru
- Content-Type: text/html; charset=UTF-8
+ Content-Type: image/png
Cache-Control: no-cache,no-store,max-age=0,must-revalidate
Set-Cookie: key1=val1
@@ -43,7 +43,7 @@
assert result.ok
assert result.content == b'Nicer'
assert dict(result.headers) == {
- 'Content-Type': 'text/plain, text/html; charset=UTF-8',
+ 'Content-Type': 'image/png',
'Cache-Control': 'no-cache,no-store,max-age=0,must-revalidate',
'Set-Cookie': 'key1=val1'
}