Mockallan

Latest version: v0.1.1

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.1.1

Fixes

- Fix issue 3: Customize `Server` HTTP header value with `Mockallan/{__version__}.`

Other

- Add support for Python >=3.8.
- Convert mockallan.py and related modules into a package directory.
- Minor updates in naming.

0.1.0

API Changes

- Replace API paths `/call-args`, `/call-args-list` and `/call-count` with `/request-body`, `/request-body-list` and `/request-count`.

Stub Configuration JSON File Format Changes

- Replace field `code` with `status_code` in stub configuration JSON. Also replace attribute `code` with `status_code` in class `Response`.

Fixes

- Validate method name when loading configuration JSON. E.g. `TypeError: 'post': unsupported method`
- Added new 400 status responses for `PUT /config` in case of invalid configuration object.

json
{
"status": 400,
"type": "json-decode-error",
"title": "Error decoding JSON object",
"detail": "JSONDecodeError: Expecting value: line 1 column 1 (char 0)."
}
{
"status": 400,
"type": "missing-property-error",
"title": "Missing required property",
"detail": "'defaults': missing required property."
}
{
"status": 400,
"type": "unexpected-property-error",
"title": "Unexpected property",
"detail": "TypeError: 'code' must be <class 'int'> but it is actually <class 'str'>."
}


Other

- Update `stub_config.json` demo file.

0.0.7

Fixes
- Handle `BrokenPipeError` while reading or writing the socket.

0.0.6

Fixes
- Fix handle PUT/POST without body properly. Now PUT/POST without body returns status 400, type `bad-request`.

0.0.5

Fixes
- GET /call-args
- GET /call-args-list

0.0.4

**Fixes**

- Fix `install_requires` jsonschema and lxml compatible versions.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.