esc-0.1
توضیحات
Check HTTP response status
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | esc-0.1 |
| نام | esc |
| نسخه کتابخانه | 0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Nathan Reynolds |
| ایمیل نویسنده | email@nreynolds.co.uk |
| آدرس صفحه اصلی | https://github.com/nathforge/esc |
| آدرس اینترنتی | https://pypi.org/project/esc/ |
| مجوز | UNKNOWN |
=======================
Esc: Expect Status Code
=======================
Checks your HTTP response has the expected status, throws an error if not:
.. code:: python
>>> response = esc.expect(404, requests.get("http://example.com"))
esc.UnexpectedStatusCode: Expected one of HTTP 404, but http://example.com/ returned 200 with content: <!doctype html>
Why?
====
1. Status code checks are ever so slightly easier.
2. Unit test failure messages are far more helpful.
Supported libraries
===================
Currently supports the following:
- requests
نحوه نصب
نصب پکیج whl esc-0.1:
pip install esc-0.1.whl
نصب پکیج tar.gz esc-0.1:
pip install esc-0.1.tar.gz