Hello community, here is the log from the commit of package python-betamax for openSUSE:Factory checked in at 2018-12-13 19:49:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-betamax (Old) and /work/SRC/openSUSE:Factory/.python-betamax.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-betamax" Thu Dec 13 19:49:42 2018 rev:5 rq:657780 version:0.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-betamax/python-betamax.changes 2017-05-17 10:55:14.151385293 +0200 +++ /work/SRC/openSUSE:Factory/.python-betamax.new.28833/python-betamax.changes 2018-12-13 19:49:47.412596595 +0100 @@ -1,0 +2,11 @@ +Thu Dec 13 09:23:17 UTC 2018 - Thomas Bechtold <[email protected]> + +- update to 0.8.1: + - Previous attempts to sanitize cassette names were incomplete. + Sanitization has become more thorough which could have some affects on + existing cassette files. **This may cause new cassettes to be generated.** + - Fix bug where there may be an exception raised in a + ``betamax.exceptions.BetamaxError`` repr. +- Use %license macro + +------------------------------------------------------------------- Old: ---- betamax-0.8.0.tar.gz New: ---- betamax-0.8.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-betamax.spec ++++++ --- /var/tmp/diff_new_pack.kq6IrW/_old 2018-12-13 19:49:47.768596135 +0100 +++ /var/tmp/diff_new_pack.kq6IrW/_new 2018-12-13 19:49:47.768596135 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-betamax # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-betamax -Version: 0.8.0 +Version: 0.8.1 Release: 0 Summary: A VCR imitation for python-requests License: Apache-2.0 @@ -47,7 +47,8 @@ %files %{python_files} %defattr(-,root,root,-) -%doc AUTHORS.rst LICENSE README.rst +%doc AUTHORS.rst README.rst +%license LICENSE %{python_sitelib}/* %changelog ++++++ betamax-0.8.0.tar.gz -> betamax-0.8.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/HISTORY.rst new/betamax-0.8.1/HISTORY.rst --- old/betamax-0.8.0/HISTORY.rst 2016-08-16 23:59:48.000000000 +0200 +++ new/betamax-0.8.1/HISTORY.rst 2018-03-13 23:23:21.000000000 +0100 @@ -1,6 +1,16 @@ History ======= +0.8.1 - 2018-03-13 +------------------ + +- Previous attempts to sanitize cassette names were incomplete. + Sanitization has become more thorough which could have some affects on + existing cassette files. **This may cause new cassettes to be generated.** + +- Fix bug where there may be an exception raised in a + ``betamax.exceptions.BetamaxError`` repr. + 0.8.0 - 2016-08-16 ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/PKG-INFO new/betamax-0.8.1/PKG-INFO --- old/betamax-0.8.0/PKG-INFO 2016-08-17 00:00:42.000000000 +0200 +++ new/betamax-0.8.1/PKG-INFO 2018-03-13 23:24:57.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: betamax -Version: 0.8.0 +Version: 0.8.1 Summary: A VCR imitation for python-requests Home-page: https://github.com/sigmavirus24/betamax -Author: Ian Cordasco +Author: Ian Stapleton Cordasco Author-email: [email protected] License: Apache 2.0 +Description-Content-Type: UNKNOWN Description: betamax ======= @@ -98,6 +99,16 @@ History ======= + 0.8.1 - 2018-03-13 + ------------------ + + - Previous attempts to sanitize cassette names were incomplete. + Sanitization has become more thorough which could have some affects on + existing cassette files. **This may cause new cassettes to be generated.** + + - Fix bug where there may be an exception raised in a + ``betamax.exceptions.BetamaxError`` repr. + 0.8.0 - 2016-08-16 ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax/__init__.py new/betamax-0.8.1/betamax/__init__.py --- old/betamax-0.8.0/betamax/__init__.py 2016-08-16 23:57:58.000000000 +0200 +++ new/betamax-0.8.1/betamax/__init__.py 2018-03-13 23:23:34.000000000 +0100 @@ -5,7 +5,7 @@ See https://betamax.readthedocs.io/ for documentation. -:copyright: (c) 2013-2016 by Ian Cordasco +:copyright: (c) 2013-2018 by Ian Stapleton Cordasco :license: Apache 2.0, see LICENSE for more details """ @@ -18,9 +18,9 @@ __all__ = ('BetamaxError', 'Betamax', 'BaseMatcher', 'BaseSerializer', 'use_cassette') -__author__ = 'Ian Cordasco' -__copyright__ = 'Copyright 2013-2014 Ian Cordasco' +__author__ = 'Ian Stapleton Cordasco' +__copyright__ = 'Copyright 2013-2018 Ian Stapleton Cordasco' __license__ = 'Apache 2.0' __title__ = 'betamax' -__version__ = '0.8.0' +__version__ = '0.8.1' __version_info__ = tuple(int(i) for i in __version__.split('.')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax/cassette/interaction.py new/betamax-0.8.1/betamax/cassette/interaction.py --- old/betamax-0.8.0/betamax/cassette/interaction.py 2016-04-29 17:06:30.000000000 +0200 +++ new/betamax-0.8.1/betamax/cassette/interaction.py 2018-03-13 22:49:44.000000000 +0100 @@ -72,8 +72,11 @@ for obj in ('request', 'response'): headers = self.data[obj]['headers'] for k, v in list(headers.items()): - v = util.from_list(v) - headers[k] = v.replace(text_to_replace, placeholder) + if isinstance(v, list): + headers[k] = [hv.replace(text_to_replace, placeholder) + for hv in v] + else: + headers[k] = v.replace(text_to_replace, placeholder) def replace_in_body(self, text_to_replace, placeholder): for obj in ('request', 'response'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax/exceptions.py new/betamax-0.8.1/betamax/exceptions.py --- old/betamax-0.8.0/betamax/exceptions.py 2016-08-12 13:25:58.000000000 +0200 +++ new/betamax-0.8.1/betamax/exceptions.py 2018-03-13 22:50:46.000000000 +0100 @@ -2,9 +2,6 @@ def __init__(self, message): super(BetamaxError, self).__init__(message) - def __repr__(self): - return 'BetamaxError("%s")' % self.message - class MissingDirectoryError(BetamaxError): pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax/fixtures/pytest.py new/betamax-0.8.1/betamax/fixtures/pytest.py --- old/betamax-0.8.0/betamax/fixtures/pytest.py 2016-08-16 23:51:53.000000000 +0200 +++ new/betamax-0.8.1/betamax/fixtures/pytest.py 2018-03-13 22:49:44.000000000 +0100 @@ -17,8 +17,10 @@ def _sanitize(name): - """Replace whitespace and / with -""" - return re.sub('[\s/]+', '-', name) + """ + Replace certain characters (which might be problematic when contained in + strings which will be used as file names) by '-'s. """ + return re.sub(r'[\s/<>:\\"|?*]', '-', name) def _casette_name(request, parametrized): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax/fixtures/unittest.py new/betamax-0.8.1/betamax/fixtures/unittest.py --- old/betamax-0.8.0/betamax/fixtures/unittest.py 2015-07-16 03:00:31.000000000 +0200 +++ new/betamax-0.8.1/betamax/fixtures/unittest.py 2017-01-19 15:23:00.000000000 +0100 @@ -48,7 +48,10 @@ # NOTE(sigmavirus24): absolute_import is required to make import unittest work from __future__ import absolute_import -import unittest +try: + import unittest2 as unittest +except ImportError: + import unittest import requests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax/serializers/base.py new/betamax-0.8.1/betamax/serializers/base.py --- old/betamax-0.8.0/betamax/serializers/base.py 2015-04-12 22:43:22.000000000 +0200 +++ new/betamax-0.8.1/betamax/serializers/base.py 2018-03-13 22:49:44.000000000 +0100 @@ -26,7 +26,7 @@ def serialize(self, cassette_data): # Take a dictionary and convert it to whatever - def deserialize(self): + def deserialize(self, cassette_data): # Uses a cassette file to return a dictionary with the # cassette information diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax.egg-info/PKG-INFO new/betamax-0.8.1/betamax.egg-info/PKG-INFO --- old/betamax-0.8.0/betamax.egg-info/PKG-INFO 2016-08-17 00:00:40.000000000 +0200 +++ new/betamax-0.8.1/betamax.egg-info/PKG-INFO 2018-03-13 23:24:57.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: betamax -Version: 0.8.0 +Version: 0.8.1 Summary: A VCR imitation for python-requests Home-page: https://github.com/sigmavirus24/betamax -Author: Ian Cordasco +Author: Ian Stapleton Cordasco Author-email: [email protected] License: Apache 2.0 +Description-Content-Type: UNKNOWN Description: betamax ======= @@ -98,6 +99,16 @@ History ======= + 0.8.1 - 2018-03-13 + ------------------ + + - Previous attempts to sanitize cassette names were incomplete. + Sanitization has become more thorough which could have some affects on + existing cassette files. **This may cause new cassettes to be generated.** + + - Fix bug where there may be an exception raised in a + ``betamax.exceptions.BetamaxError`` repr. + 0.8.0 - 2016-08-16 ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax.egg-info/SOURCES.txt new/betamax-0.8.1/betamax.egg-info/SOURCES.txt --- old/betamax-0.8.0/betamax.egg-info/SOURCES.txt 2016-08-17 00:00:42.000000000 +0200 +++ new/betamax-0.8.1/betamax.egg-info/SOURCES.txt 2018-03-13 23:24:57.000000000 +0100 @@ -58,7 +58,6 @@ docs/usage_patterns.rst tests/__init__.py tests/conftest.py -tests/cassettes/FakeBetamaxTestCase.test_fake.json tests/cassettes/GitHub_create_issue.json tests/cassettes/GitHub_emojis.json tests/cassettes/global_preserve_exact_body_bytes.json @@ -71,7 +70,10 @@ tests/cassettes/test.json tests/cassettes/test_replays_response_on_right_order.json tests/cassettes/tests.integration.test_fixtures.TestPyTestFixtures.test_pytest_fixture.json -tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https:-httpbin.org-get].json +tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https---httpbin.org-get].json +tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[aaa-bbb].json +tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[ccc-ddd].json +tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[eee-fff].json tests/integration/__init__.py tests/integration/helper.py tests/integration/test_allow_playback_repeats.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/betamax.egg-info/requires.txt new/betamax-0.8.1/betamax.egg-info/requires.txt --- old/betamax-0.8.0/betamax.egg-info/requires.txt 2016-08-17 00:00:40.000000000 +0200 +++ new/betamax-0.8.1/betamax.egg-info/requires.txt 2018-03-13 23:24:57.000000000 +0100 @@ -1 +1 @@ -requests >= 2.0 +requests>=2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/docs/configuring.rst new/betamax-0.8.1/docs/configuring.rst --- old/betamax-0.8.0/docs/configuring.rst 2016-04-29 18:01:58.000000000 +0200 +++ new/betamax-0.8.1/docs/configuring.rst 2017-01-19 15:23:00.000000000 +0100 @@ -72,7 +72,7 @@ Setting Default Cassette Options ```````````````````````````````` -Cassettes have default options used by Betmax if none are set. For example, +Cassettes have default options used by Betamax if none are set. For example, - The default record mode is ``once``. @@ -115,7 +115,7 @@ import os - import betmax + import betamax import requests from my_module import me diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/docs/integrations.rst new/betamax-0.8.1/docs/integrations.rst --- old/betamax-0.8.0/docs/integrations.rst 2016-02-06 17:30:09.000000000 +0100 +++ new/betamax-0.8.1/docs/integrations.rst 2017-01-19 15:23:00.000000000 +0100 @@ -85,8 +85,8 @@ from betamax.fixtures import unittest - class IntegrationTestCase(unitest.BetamaxTestCase): - # Add your the rest of the helper methods you want for your + class IntegrationTestCase(unittest.BetamaxTestCase): + # Add the rest of the helper methods you want for your # integration tests @@ -122,8 +122,8 @@ from myapi import session - class IntegrationTestCase(unitest.BetamaxTestCase): - # Add your the rest of the helper methods you want for your + class IntegrationTestCase(unittest.BetamaxTestCase): + # Add the rest of the helper methods you want for your # integration tests SESSION_CLASS = session.MyApiSession diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/docs/introduction.rst new/betamax-0.8.1/docs/introduction.rst --- old/betamax-0.8.0/docs/introduction.rst 2016-01-17 19:55:15.000000000 +0100 +++ new/betamax-0.8.1/docs/introduction.rst 2017-01-19 15:23:00.000000000 +0100 @@ -100,7 +100,7 @@ If we now run our new example, we'll see a new file appear in our :file:`examples/cassettes/` directory named -:file:`more-complciated-cassettes.json`. This cassette will be much larger as +:file:`more-complicated-cassettes.json`. This cassette will be much larger as a result of making 3 requests and receiving 3 responses. You'll also notice that we imported :mod:`betamax_serializers.pretty_json` and called :meth:`~betamax.Betamax.register_serializer` with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/docs/usage_patterns.rst new/betamax-0.8.1/docs/usage_patterns.rst --- old/betamax-0.8.0/docs/usage_patterns.rst 2016-01-18 00:59:40.000000000 +0100 +++ new/betamax-0.8.1/docs/usage_patterns.rst 2017-01-19 15:23:00.000000000 +0100 @@ -53,8 +53,8 @@ ensure we're authenticated when possible but that we do not leave our placeholder in the cassettes when they're replayed. -Using Human Readble JSON Cassettes ----------------------------------- +Using Human Readable JSON Cassettes +----------------------------------- Using the ``PrettyJSONSerializer`` provided by the ``betamax_serializers`` package provides human readable JSON cassettes. Cassettes output in this way diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/setup.cfg new/betamax-0.8.1/setup.cfg --- old/betamax-0.8.0/setup.cfg 2016-08-17 00:00:42.000000000 +0200 +++ new/betamax-0.8.1/setup.cfg 2018-03-13 23:24:57.000000000 +0100 @@ -4,5 +4,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/setup.py new/betamax-0.8.1/setup.py --- old/betamax-0.8.0/setup.py 2016-02-06 17:30:02.000000000 +0100 +++ new/betamax-0.8.1/setup.py 2018-03-13 23:21:51.000000000 +0100 @@ -35,7 +35,7 @@ long_description="\n\n".join([data_for("README.rst"), data_for("HISTORY.rst")]), license="Apache 2.0", - author="Ian Cordasco", + author="Ian Stapleton Cordasco", author_email="[email protected]", url="https://github.com/sigmavirus24/betamax", packages=packages, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/cassettes/FakeBetamaxTestCase.test_fake.json new/betamax-0.8.1/tests/cassettes/FakeBetamaxTestCase.test_fake.json --- old/betamax-0.8.0/tests/cassettes/FakeBetamaxTestCase.test_fake.json 2016-08-10 12:45:01.000000000 +0200 +++ new/betamax-0.8.1/tests/cassettes/FakeBetamaxTestCase.test_fake.json 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -{"http_interactions": [], "recorded_with": "betamax/0.7.2"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https---httpbin.org-get].json new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https---httpbin.org-get].json --- old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https---httpbin.org-get].json 1970-01-01 01:00:00.000000000 +0100 +++ new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https---httpbin.org-get].json 2018-03-13 22:49:44.000000000 +0100 @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Connection": ["keep-alive"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["python-requests/2.13.0"]}, "method": "GET", "uri": "https://httpbin.org/get"}, "response": {"body": {"string": "{\n \"args\": {}, \n \"headers\": {\n \"Accept\": \"*/*\", \n \"Accept-Encoding\": \"gzip, deflate\", \n \"Host\": \"httpbin.org\", \n \"User-Agent\": \"python-requests/2.13.0\"\n }, \n \"origin\": \"216.98.56.20\", \n \"url\": \"https://httpbin.org/get\"\n}\n", "encoding": null}, "headers": {"Content-Length": ["238"], "Server": ["nginx"], "Connection": ["keep-alive"], "Access-Control-Allow-Credentials": ["true"], "Date": ["Fri, 10 Mar 2017 16:58:21 GMT"], "Access-Control-Allow-Origin": ["*"], "Content-Type": ["application/json"]}, "status": {"message": "OK", "code": 200}, "url": "https://httpbin.org/get"}, "recorded_at": "2017-03-10T16:58:21"}], "recorded_with": "betamax/0.8.0"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https:-httpbin.org-get].json new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https:-httpbin.org-get].json --- old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https:-httpbin.org-get].json 2016-08-16 23:51:53.000000000 +0200 +++ new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.TestPyTestParametrizedFixtures.test_pytest_fixture[https:-httpbin.org-get].json 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -{"recorded_with": "betamax/0.4.2", "http_interactions": [{"recorded_at": "2015-05-25T00:46:42", "response": {"body": {"encoding": null, "string": "{\n \"args\": {}, \n \"headers\": {\n \"Accept\": \"*/*\", \n \"Accept-Encoding\": \"gzip, deflate\", \n \"Host\": \"httpbin.org\", \n \"User-Agent\": \"python-requests/2.6.0 CPython/3.4.2 Darwin/14.1.0\"\n }, \n \"origin\": \"72.160.201.47\", \n \"url\": \"https://httpbin.org/get\"\n}\n"}, "status": {"message": "OK", "code": 200}, "url": "https://httpbin.org/get", "headers": {"connection": ["keep-alive"], "content-type": ["application/json"], "content-length": ["266"], "date": ["Mon, 25 May 2015 00:46:42 GMT"], "access-control-allow-origin": ["*"], "access-control-allow-credentials": ["true"], "server": ["nginx"]}}, "request": {"method": "GET", "body": {"encoding": "utf-8", "string": ""}, "uri": "https://httpbin.org/get", "headers": {"Connection": ["keep-alive"], "User-Agent": ["python-requests/2.6.0 CPython/3.4.2 Darwin/14.1.0"], "Accept": ["*/*"], "Accept-Encoding": ["gzip, deflate"]}}}]} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[aaa-bbb].json new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[aaa-bbb].json --- old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[aaa-bbb].json 1970-01-01 01:00:00.000000000 +0100 +++ new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[aaa-bbb].json 2018-03-13 22:49:44.000000000 +0100 @@ -0,0 +1 @@ +{"http_interactions": [], "recorded_with": "betamax/0.8.0"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[ccc-ddd].json new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[ccc-ddd].json --- old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[ccc-ddd].json 1970-01-01 01:00:00.000000000 +0100 +++ new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[ccc-ddd].json 2018-03-13 22:49:44.000000000 +0100 @@ -0,0 +1 @@ +{"http_interactions": [], "recorded_with": "betamax/0.8.0"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[eee-fff].json new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[eee-fff].json --- old/betamax-0.8.0/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[eee-fff].json 1970-01-01 01:00:00.000000000 +0100 +++ new/betamax-0.8.1/tests/cassettes/tests.integration.test_fixtures.test_pytest_parametrize_with_filesystem_problematic_chars[eee-fff].json 2018-03-13 22:49:44.000000000 +0100 @@ -0,0 +1 @@ +{"http_interactions": [], "recorded_with": "betamax/0.8.0"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/integration/test_fixtures.py new/betamax-0.8.1/tests/integration/test_fixtures.py --- old/betamax-0.8.0/tests/integration/test_fixtures.py 2016-08-16 23:51:53.000000000 +0200 +++ new/betamax-0.8.1/tests/integration/test_fixtures.py 2018-03-13 22:49:44.000000000 +0100 @@ -36,7 +36,7 @@ cassette_name = ('tests.integration.test_fixtures.' # Module name 'TestPyTestParametrizedFixtures.' # Class name 'test_pytest_fixture' # Test function name - '[https:-httpbin.org-get]' # Parameter + '[https---httpbin.org-get]' # Parameter '.json') file_name = os.path.join(test_dir, 'tests', 'cassettes', cassette_name) @@ -49,3 +49,12 @@ """Exercise the fixture itself.""" resp = betamax_parametrized_session.get(url) assert resp.ok + + [email protected]('problematic_arg', [r'aaa\bbb', 'ccc:ddd', 'eee*fff']) +def test_pytest_parametrize_with_filesystem_problematic_chars( + betamax_parametrized_session, problematic_arg): + """ + Exercice parametrized args containing characters which might cause + problems when getting translated into file names. """ + assert True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/integration/test_placeholders.py new/betamax-0.8.1/tests/integration/test_placeholders.py --- old/betamax-0.8.0/tests/integration/test_placeholders.py 2016-04-29 17:06:30.000000000 +0200 +++ new/betamax-0.8.1/tests/integration/test_placeholders.py 2018-03-13 22:49:44.000000000 +0100 @@ -38,4 +38,4 @@ self.cassette_path = cassette.cassette_path i = cassette.interactions[0] auth = i.data['request']['headers']['Authorization'] - assert '<AUTHORIZATION>' in auth + assert '<AUTHORIZATION>' in auth[0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/integration/test_record_modes.py new/betamax-0.8.1/tests/integration/test_record_modes.py --- old/betamax-0.8.0/tests/integration/test_record_modes.py 2016-04-26 16:20:58.000000000 +0200 +++ new/betamax-0.8.1/tests/integration/test_record_modes.py 2018-03-13 22:49:44.000000000 +0100 @@ -29,12 +29,16 @@ r0_headers = r0.headers.copy() r0_headers.pop('Date') r0_headers.pop('Age', None) + r0_headers.pop('X-Processed-Time', None) r1_headers = r1.headers.copy() r1_headers.pop('Date') r1_headers.pop('Age', None) + r1_headers.pop('X-Processed-Time', None) # NOTE(sigmavirus24): This fails if the second request is # technically a second later. Ignoring the Date headers allows # this test to succeed. + # NOTE(hroncok): httpbin.org added X-Processed-Time header that + # can possibly differ (and often does) assert r0_headers == r1_headers assert r0.content == r1.content diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/unit/test_cassette.py new/betamax-0.8.1/tests/unit/test_cassette.py --- old/betamax-0.8.0/tests/unit/test_cassette.py 2016-08-12 13:25:58.000000000 +0200 +++ new/betamax-0.8.1/tests/unit/test_cassette.py 2018-03-13 22:49:44.000000000 +0100 @@ -354,7 +354,8 @@ }, 'headers': { 'Content-Type': [decode('foo')], - 'Set-Cookie': ['cookie_name=cookie_value'] + 'Set-Cookie': ['cookie_name=cookie_value', + 'sessionid=deadbeef'] }, 'status_code': 200, 'url': 'http://example.com', @@ -386,13 +387,14 @@ for attr in ['status_code', 'url']: assert self.response[attr] == decode(getattr(r, attr)) - headers = dict((k, v[0]) for k, v in self.response['headers'].items()) + headers = dict((k, ', '.join(v)) + for k, v in self.response['headers'].items()) assert headers == r.headers tested_cookie = False for cookie in r.cookies: cookie_str = "{0}={1}".format(cookie.name, cookie.value) - assert cookie_str == r.headers['Set-Cookie'] + assert cookie_str in r.headers['Set-Cookie'] tested_cookie = True assert tested_cookie @@ -420,10 +422,12 @@ self.interaction.replace('foo', '<FOO>') self.interaction.replace('http://example.com', '<EXAMPLE_URI>') - header = self.interaction.data['request']['headers']['Authorization'] + header = ( + self.interaction.data['request']['headers']['Authorization'][0]) assert header == '<AUTH_TOKEN>' header = self.interaction.data['response']['headers']['Set-Cookie'] - assert header == 'cookie_name=<COOKIE_VALUE>' + assert header[0] == 'cookie_name=<COOKIE_VALUE>' + assert header[1] == 'sessionid=deadbeef' body = self.interaction.data['request']['body']['string'] assert body == 'key=value&key2=<SECRET_VALUE>' body = self.interaction.data['response']['body'] @@ -436,9 +440,10 @@ def test_replace_in_headers(self): self.interaction.replace_in_headers('123456789abcdef', '<AUTH_TOKEN>') self.interaction.replace_in_headers('cookie_value', '<COOKIE_VALUE>') - header = self.interaction.data['request']['headers']['Authorization'] + header = ( + self.interaction.data['request']['headers']['Authorization'][0]) assert header == '<AUTH_TOKEN>' - header = self.interaction.data['response']['headers']['Set-Cookie'] + header = self.interaction.data['response']['headers']['Set-Cookie'][0] assert header == 'cookie_name=<COOKIE_VALUE>' def test_replace_in_body(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/betamax-0.8.0/tests/unit/test_exceptions.py new/betamax-0.8.1/tests/unit/test_exceptions.py --- old/betamax-0.8.0/tests/unit/test_exceptions.py 2016-08-12 13:25:58.000000000 +0200 +++ new/betamax-0.8.1/tests/unit/test_exceptions.py 2018-03-13 23:15:05.000000000 +0100 @@ -33,3 +33,11 @@ def test_invalid_option_is_validation_error(self): assert isinstance(exceptions.InvalidOption('msg'), exceptions.ValidationError) + + def test_betamaxerror_repr(self): + """Ensure errors don't raise exceptions in their __repr__. + + This should protect against regression. If this test starts failing, + heavily modify it to not be flakey. + """ + assert "BetamaxError" in repr(exceptions.BetamaxError('test'))
