![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
.. image:: https://badge.fury.io/py/mocker-client.svg :target: https://badge.fury.io/py/mocker-client
.. image:: https://codecov.io/gh/vilus/mocker_client/branch/master/graph/badge.svg :target: https://codecov.io/gh/vilus/mocker_client
.. image:: https://travis-ci.org/vilus/mocker_client.svg?branch=master :target: https://travis-ci.org/vilus/mocker_client
python client for create/delete mocks on mock server
.. code-block:: bash
pip install mocker-client
.. code-block:: python
from mocker_client import MockServer, Mock
mock = MockServer(url='http://127.0.0.1:8080/mocker_api/mocks/').create_mock(
{'name': 'hi', 'route': '/q', 'method': 'get', 'responses': 'Hi_1'}
)
# actions
mock.delete()
#
help(MockServer.create_mock)
create_mock(self, data)
:param data: dict with keys:
'name' - optional, '' by default
'route' - for example '/some_path'
'method' - a http method like GET, POST, PUT, etc
'response_type' - optional, choice from ['single', 'sequence', 'cycle'], 'single' by default
'responses' - list of dicts with keys (or just dict if response_type is single):
'body' - response body
'return_code' - http status code, like 200
'headers' - dict with http headers
:returns Mock object
#
help(MockServer.create_mocks)
create_mocks(self, list_data)
:param list_data: list of dicts with keys:
'name' - optional, '' by default
'route' - for example '/some_path'
'method' - a http method like GET, POST, PUT, etc
'response_type' - optional, choice from ['single', 'sequence', 'cycle'], 'single' by default
'responses' - list of dicts with keys (or just dict if response_type is single):
'body' - response body
'return_code' - http status code, like 200
'headers' - dict with http headers
:returns list of Mock objects
#
help(Mock.delete)
delete(self)
delete mock on server and return its info - {is_expired: bool}
FAQs
client for http mock server https://github.com/vilus/mocker
We found that mocker-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.