Skip to content

[test] Add units tests for Python MockResponse #27

Description

@AryanSharma48

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

  • Tests cover MockResponse
  • .json() is verified
  • .text is verified
  • .ok is verified
  • .status_code is verified
  • Tests pass with the existing test suite

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions