macxred / cashctrl_api

Python client for the CashCtrl REST API
MIT License
0 stars 0 forks source link

feat: align test suits #39

Open AlexTheWizardL opened 1 month ago

AlexTheWizardL commented 1 month ago

This PR covers changes that align test suits to a common standard.

  1. Removed docstrings from test suits and renamed them instead. Example:

from:

def test_keep_extra_columns() -> None:
    """Test dropping columns not in the required or optional lists."""

to:

def test_drop_extra_columns_with_keep_extra_columns_false():
  1. Deleted useless branches of code that are not possible by the system, specifically we can not have entries with the same ID. Example (this code is removed):

    elif len(result) > 1:
            raise ValueError(f"Multiple paths found for account category id: {id}")
  2. Removed useless type hints for the fixtures and tests suits. For further details, see the discussions on type annotations for fixtures, the pytest documentation and the Django project.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Flag Coverage Δ
unittests 93.86% <100.00%> (+0.72%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cashctrl_api/cashed_client.py 94.02% <ø> (+1.83%) :arrow_up:
cashctrl_api/client.py 92.95% <100.00%> (ø)