Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-mocket for openSUSE:Factory checked in at 2021-02-04 20:23:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mocket (Old) and /work/SRC/openSUSE:Factory/.python-mocket.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mocket" Thu Feb 4 20:23:25 2021 rev:11 rq:868763 version:3.9.40 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mocket/python-mocket.changes 2021-01-26 14:44:20.999218095 +0100 +++ /work/SRC/openSUSE:Factory/.python-mocket.new.28504/python-mocket.changes 2021-02-04 20:24:08.806832893 +0100 @@ -1,0 +2,12 @@ +Tue Feb 2 21:33:54 UTC 2021 - Sebastian Wagner <sebix+novell....@sebix.at> + +- disable test test_asyncio_record_replay as it requires DNS. + +------------------------------------------------------------------- +Sat Jan 23 19:20:19 UTC 2021 - Sebastian Wagner <sebix+novell....@sebix.at> + +- Update to version 3.9.40: + - Fix for asyncio.open_connection() (#144) + - fix UT for 3.5 support + +------------------------------------------------------------------- Old: ---- mocket-3.9.39.tar.gz New: ---- mocket-3.9.40.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mocket.spec ++++++ --- /var/tmp/diff_new_pack.4XNmy8/_old 2021-02-04 20:24:09.450833874 +0100 +++ /var/tmp/diff_new_pack.4XNmy8/_new 2021-02-04 20:24:09.454833879 +0100 @@ -26,7 +26,7 @@ %bcond_with test %endif Name: python-mocket%{psuffix} -Version: 3.9.39 +Version: 3.9.40 Release: 0 Summary: Python socket mock framework License: BSD-3-Clause @@ -106,7 +106,8 @@ %if %{python3_version_nodots} < 38 pytest_python3_ignore="--ignore tests/tests38" %endif -%pytest -k 'not RedisTestCase' ${pytest_$python_ignore} +# test_asyncio_record_replay requires DNS ("Temporary failure in name resolution") +%pytest -k 'not RedisTestCase and not test_asyncio_record_replay' ${pytest_$python_ignore} %endif %if !%{with test} ++++++ mocket-3.9.39.tar.gz -> mocket-3.9.40.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.39/PKG-INFO new/mocket-3.9.40/PKG-INFO --- old/mocket-3.9.39/PKG-INFO 2021-01-15 17:23:26.652558300 +0100 +++ new/mocket-3.9.40/PKG-INFO 2021-01-21 17:38:53.250246300 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: mocket -Version: 3.9.39 +Version: 3.9.40 Summary: Socket Mock Framework - for all kinds of socket animals, web-clients included - with gevent/asyncio/SSL support Home-page: https://github.com/mindflayer/python-mocket Author: Giorgio Salluzzo @@ -10,15 +10,14 @@ mocket /m????k??t/ =============== - .. image:: https://travis-ci.com/mindflayer/python-mocket.svg?branch=master - :target: https://travis-ci.com/mindflayer/python-mocket + .. image:: https://github.com/mindflayer/python-mocket/workflows/Mocket's%20CI/badge.svg + :target: https://github.com/mindflayer/python-mocket/actions?query=workflow%3A%22Mocket%27s+CI%22 .. image:: https://coveralls.io/repos/github/mindflayer/python-mocket/badge.svg?branch=master :target: https://coveralls.io/github/mindflayer/python-mocket?branch=master - .. image:: https://codeclimate.com/github/mindflayer/python-mocket/badges/gpa.svg - :target: https://codeclimate.com/github/mindflayer/python-mocket - :alt: Code Climate + .. image:: https://img.shields.io/lgtm/grade/python/g/mindflayer/python-mocket.svg?logo=lgtm&logoWidth=18 + :target: https://lgtm.com/projects/g/mindflayer/python-mocket/context:python .. image:: https://requires.io/github/mindflayer/python-mocket/requirements.svg?branch=master :target: https://requires.io/github/mindflayer/python-mocket/requirements/?branch=master @@ -62,7 +61,7 @@ - https://github.com/mindflayer/mocketoy - As next step, you are invited to have a look at both the implementation of the two mocks it provides: + As next step, you are invited to have a look at the implementation of both the mocks it provides: - HTTP mock (similar to HTTPretty) - https://github.com/mindflayer/python-mocket/blob/master/mocket/mockhttp.py - Redis mock (basic implementation) - https://github.com/mindflayer/python-mocket/blob/master/mocket/mockredis.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.39/README.rst new/mocket-3.9.40/README.rst --- old/mocket-3.9.39/README.rst 2021-01-02 15:19:24.000000000 +0100 +++ new/mocket-3.9.40/README.rst 2021-01-21 17:34:44.000000000 +0100 @@ -2,15 +2,14 @@ mocket /m????k??t/ =============== -.. image:: https://travis-ci.com/mindflayer/python-mocket.svg?branch=master - :target: https://travis-ci.com/mindflayer/python-mocket +.. image:: https://github.com/mindflayer/python-mocket/workflows/Mocket's%20CI/badge.svg + :target: https://github.com/mindflayer/python-mocket/actions?query=workflow%3A%22Mocket%27s+CI%22 .. image:: https://coveralls.io/repos/github/mindflayer/python-mocket/badge.svg?branch=master :target: https://coveralls.io/github/mindflayer/python-mocket?branch=master -.. image:: https://codeclimate.com/github/mindflayer/python-mocket/badges/gpa.svg - :target: https://codeclimate.com/github/mindflayer/python-mocket - :alt: Code Climate +.. image:: https://img.shields.io/lgtm/grade/python/g/mindflayer/python-mocket.svg?logo=lgtm&logoWidth=18 + :target: https://lgtm.com/projects/g/mindflayer/python-mocket/context:python .. image:: https://requires.io/github/mindflayer/python-mocket/requirements.svg?branch=master :target: https://requires.io/github/mindflayer/python-mocket/requirements/?branch=master @@ -54,7 +53,7 @@ - https://github.com/mindflayer/mocketoy -As next step, you are invited to have a look at both the implementation of the two mocks it provides: +As next step, you are invited to have a look at the implementation of both the mocks it provides: - HTTP mock (similar to HTTPretty) - https://github.com/mindflayer/python-mocket/blob/master/mocket/mockhttp.py - Redis mock (basic implementation) - https://github.com/mindflayer/python-mocket/blob/master/mocket/mockredis.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.39/mocket/__init__.py new/mocket-3.9.40/mocket/__init__.py --- old/mocket-3.9.39/mocket/__init__.py 2021-01-15 17:23:19.000000000 +0100 +++ new/mocket-3.9.40/mocket/__init__.py 2021-01-21 17:37:02.000000000 +0100 @@ -2,4 +2,4 @@ __all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer") -__version__ = "3.9.39" +__version__ = "3.9.40" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.39/mocket/mocket.py new/mocket-3.9.40/mocket/mocket.py --- old/mocket-3.9.39/mocket/mocket.py 2021-01-15 17:23:19.000000000 +0100 +++ new/mocket-3.9.40/mocket/mocket.py 2021-01-21 17:36:07.000000000 +0100 @@ -373,7 +373,7 @@ def send(self, data, *args, **kwargs): # pragma: no cover entry = self.get_entry(data) - if entry and self._entry != entry: + if not entry or (entry and self._entry != entry): self.sendall(data, entry=entry, *args, **kwargs) else: req = Mocket.last_request() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.39/mocket.egg-info/PKG-INFO new/mocket-3.9.40/mocket.egg-info/PKG-INFO --- old/mocket-3.9.39/mocket.egg-info/PKG-INFO 2021-01-15 17:23:26.000000000 +0100 +++ new/mocket-3.9.40/mocket.egg-info/PKG-INFO 2021-01-21 17:38:53.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: mocket -Version: 3.9.39 +Version: 3.9.40 Summary: Socket Mock Framework - for all kinds of socket animals, web-clients included - with gevent/asyncio/SSL support Home-page: https://github.com/mindflayer/python-mocket Author: Giorgio Salluzzo @@ -10,15 +10,14 @@ mocket /m????k??t/ =============== - .. image:: https://travis-ci.com/mindflayer/python-mocket.svg?branch=master - :target: https://travis-ci.com/mindflayer/python-mocket + .. image:: https://github.com/mindflayer/python-mocket/workflows/Mocket's%20CI/badge.svg + :target: https://github.com/mindflayer/python-mocket/actions?query=workflow%3A%22Mocket%27s+CI%22 .. image:: https://coveralls.io/repos/github/mindflayer/python-mocket/badge.svg?branch=master :target: https://coveralls.io/github/mindflayer/python-mocket?branch=master - .. image:: https://codeclimate.com/github/mindflayer/python-mocket/badges/gpa.svg - :target: https://codeclimate.com/github/mindflayer/python-mocket - :alt: Code Climate + .. image:: https://img.shields.io/lgtm/grade/python/g/mindflayer/python-mocket.svg?logo=lgtm&logoWidth=18 + :target: https://lgtm.com/projects/g/mindflayer/python-mocket/context:python .. image:: https://requires.io/github/mindflayer/python-mocket/requirements.svg?branch=master :target: https://requires.io/github/mindflayer/python-mocket/requirements/?branch=master @@ -62,7 +61,7 @@ - https://github.com/mindflayer/mocketoy - As next step, you are invited to have a look at both the implementation of the two mocks it provides: + As next step, you are invited to have a look at the implementation of both the mocks it provides: - HTTP mock (similar to HTTPretty) - https://github.com/mindflayer/python-mocket/blob/master/mocket/mockhttp.py - Redis mock (basic implementation) - https://github.com/mindflayer/python-mocket/blob/master/mocket/mockredis.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.39/mocket.egg-info/SOURCES.txt new/mocket-3.9.40/mocket.egg-info/SOURCES.txt --- old/mocket-3.9.39/mocket.egg-info/SOURCES.txt 2021-01-15 17:23:26.000000000 +0100 +++ new/mocket-3.9.40/mocket.egg-info/SOURCES.txt 2021-01-21 17:38:53.000000000 +0100 @@ -36,6 +36,7 @@ tests/tests35/README.txt tests/tests35/__init__.py tests/tests35/test_http_aiohttp.py +tests/tests37/test_asyncio.py tests/tests38/README.txt tests/tests38/__init__.py tests/tests38/test_http_aiohttp.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.39/tests/tests37/test_asyncio.py new/mocket-3.9.40/tests/tests37/test_asyncio.py --- old/mocket-3.9.39/tests/tests37/test_asyncio.py 1970-01-01 01:00:00.000000000 +0100 +++ new/mocket-3.9.40/tests/tests37/test_asyncio.py 2021-01-21 17:36:07.000000000 +0100 @@ -0,0 +1,45 @@ +import asyncio +import json +from unittest import TestCase +import socket +import io + +from mocket.mocket import Mocket, mocketize + + +class AsyncIoRecordTestCase(TestCase): + def test_asyncio_record_replay(self): + async def test_asyncio_connection(): + mock_out = b'HTTP/1.1 301 Moved Permanently\r\n' + reader, writer = await asyncio.open_connection( + host='google.com', + port=80, + family=socket.AF_INET, + proto=socket.IPPROTO_TCP, + ssl=None, + server_hostname=None, + ) + + buf = 'GET / HTTP/1.1\r\nHost: google.com\r\n\r\n' + writer.write(buf.encode()) + await writer.drain() + + r = await reader.readline() + writer.close() + await writer.wait_closed() + + mock_out = b'HTTP/1.1 301 Moved Permanently\r\n' + + test_name = 'test_asyncio_record' + # This enables mocket to record the response + Mocket.enable(test_name, ".") + + loop = asyncio.get_event_loop() + loop.set_debug(True) + loop.run_until_complete(test_asyncio_connection()) + + dump_filename = f'./{test_name}.json' + with io.open(dump_filename) as f: + responses = json.load(f) + + assert len(responses["google.com"]["80"].keys()) == 1