Skip to content

Commit 07ef286

Browse files
committed
Merge pull request #12 from msabramo/update_DESCRIPTION.rst
DESCRIPTION.rst: code blocks + wrap text
2 parents 231e878 + da85e88 commit 07ef286

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

DESCRIPTION.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
pytest-httpbin
22
==============
33

4-
httpbin is an amazing web service for testing HTTP libraries. It has several great endpoints that can test pretty much everything you need in a HTTP library. The only problem is: maybe you don't want to wait for your tests to travel across the Internet and back to make assertions against a remote web service.
4+
httpbin is an amazing web service for testing HTTP libraries. It has several
5+
great endpoints that can test pretty much everything you need in a HTTP
6+
library. The only problem is: maybe you don't want to wait for your tests to
7+
travel across the Internet and back to make assertions against a remote web
8+
service.
59

6-
Enter pytest-httpbin. Pytest-httpbin creates a pytest "fixture" that is dependency-injected into your tests. It automatically starts up a HTTP server in a separate thread running httpbin and provides your test with the URL in the fixture. Check out this example:
10+
Enter pytest-httpbin. Pytest-httpbin creates a pytest "fixture" that is
11+
dependency-injected into your tests. It automatically starts up a HTTP server
12+
in a separate thread running httpbin and provides your test with the URL in the
13+
fixture. Check out this example:
14+
15+
.. code-block:: python
716
817
def test_that_my_library_works_kinda_ok(httpbin):
918
assert requests.get(httpbin.url + '/get/').status_code == 200
10-
19+
1120
This replaces a test that might have looked like this before:
1221

22+
.. code-block:: python
23+
1324
def test_that_my_library_works_kinda_ok():
1425
assert requests.get('http://httpbin.org/get').status_code == 200
1526
16-
pytest-httpbin also supports https and includes its own CA cert you can use. Check out `the full documentation`_ on the github page.
27+
pytest-httpbin also supports https and includes its own CA cert you can use.
28+
Check out `the full documentation`_ on the github page.
1729

1830
.. _the full documentation: https://github.com/kevin1024/pytest-httpbin

0 commit comments

Comments
 (0)