Skip to content

Commit 1dc25b8

Browse files
committed
Bump version.
1 parent d4d2a50 commit 1dc25b8

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

README.rst

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ Starting from *3.7.0*, Mocket major version will follow the same numbering patte
2626

2727
Support it
2828
==========
29-
*Star* the project on GitHub, Buy Me a Coffee or, even better, contribute with patches or documentation.
29+
*Star* the project on GitHub, *Buy Me a Coffee* clicking the button below or, even better, contribute with patches or documentation.
30+
31+
Thanks to `@felixonmars`_ Mocket is available in the `Arch Linux repository`_.
32+
33+
.. _`@felixonmars`: https://github.com/felixonmars
34+
.. _`Arch Linux repository`: https://www.archlinux.org/packages/community/any/python-mocket/
3035

3136
.. image:: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
3237
:target: https://www.buymeacoffee.com/mULbInw5z
@@ -82,53 +87,53 @@ As second step, we create an `example.py` file as the following one:
8287
.. code-block:: python
8388
8489
import json
85-
90+
8691
from mocket import mocketize
8792
from mocket.mockhttp import Entry
8893
import requests
8994
import pytest
90-
91-
95+
96+
9297
@pytest.fixture
9398
def response():
9499
return {
95100
"integer": 1,
96101
"string": "asd",
97102
"boolean": False,
98103
}
99-
100-
104+
105+
101106
@mocketize # use its decorator
102107
def test_json(response):
103108
url_to_mock = 'https://testme.org/json'
104-
109+
105110
Entry.single_register(
106111
Entry.GET,
107112
url_to_mock,
108113
body=json.dumps(response),
109114
headers={'content-type': 'application/json'}
110115
)
111-
116+
112117
mocked_response = requests.get(url_to_mock).json()
113-
118+
114119
assert response == mocked_response
115120
116121
# OR use its context manager
117122
from mocket import Mocketizer
118-
123+
119124
def test_json_with_context_manager(response):
120125
url_to_mock = 'https://testme.org/json'
121-
126+
122127
Entry.single_register(
123128
Entry.GET,
124129
url_to_mock,
125130
body=json.dumps(response),
126131
headers={'content-type': 'application/json'}
127132
)
128-
133+
129134
with Mocketizer():
130135
mocked_response = requests.get(url_to_mock).json()
131-
136+
132137
assert response == mocked_response
133138
134139
Let's fire our example test::
@@ -183,7 +188,7 @@ What about the other socket animals?
183188
====================================
184189
Using *Mocket* with asyncio based clients::
185190

186-
$ pip install aiohttp
191+
$ pip install aiohttp
187192

188193
Example:
189194

mocket/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
__all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer")
99

10-
__version__ = "3.8.6"
10+
__version__ = "3.8.7"

0 commit comments

Comments
 (0)