Skip to content

[maintenance] Refactor task list tests with direct method calls #300

@PGijsbers

Description

@PGijsbers

I have to update the dev guidelines still to reflect this, but for tests we want to do the following:

  1. have a migration test which compares the PHP to the Python endpoint by calling the APIs
  2. have a 'happy path test' of the Python endpoint by calling the API
  3. have tests on input validation that call the Python API. This specifically concerns input validation that should be handled through FastAPI+Pydantic's function type annotation.
  4. otherwise test the behavior of the function, including correct processing of parameters and raising of errors, through calling the Python function which implements the endpoint correctly. Because it's quite a bit faster (the Client fixture is expensive) and output comparison is cleaner for endpoints which have a defined output type ( instead of JSON objects).

See #298 for an example.

@saathviksheerla will work on this, unless otherwise indicated by them.

Metadata

Metadata

Labels

maintenanceimprovements or changes to existing systemstests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions