Problem
SmoothAPI provides a MockResponse class for representing responses when
a circuit is open.
The class currently does not have dedicated unit tests covering its
basic properties and methods.
What needs to be done
Add unit tests covering the behavior of MockResponse.
The tests should verify the expected behavior of:
.json()
.text
.ok
.status_code
The tests should use a locally-created MockResponse and should not make
any network requests.
Acceptance Criteria
Files to look at
packages/smooth-api-py/smooth_api/__init__.py
packages/smooth-api-py/tests/
Prerequisites
Basic Python and basic pytest knowledge.
Notes
Keep the tests isolated. No external network calls should be required.
Problem
SmoothAPI provides a
MockResponseclass for representing responses whena circuit is open.
The class currently does not have dedicated unit tests covering its
basic properties and methods.
What needs to be done
Add unit tests covering the behavior of
MockResponse.The tests should verify the expected behavior of:
.json().text.ok.status_codeThe tests should use a locally-created
MockResponseand should not makeany network requests.
Acceptance Criteria
MockResponse.json()is verified.textis verified.okis verified.status_codeis verifiedFiles to look at
packages/smooth-api-py/smooth_api/__init__.pypackages/smooth-api-py/tests/Prerequisites
Basic Python and basic pytest knowledge.
Notes
Keep the tests isolated. No external network calls should be required.