Skip to content

test_fine_tuning

Merged Documentation for Fine Tuning Tests

Overview

This documentation covers two test functions: test_fine_tuning_base and test_fine_tuning_all, which are designed to validate the fine tuning API endpoints and workflows.


test_fine_tuning_base

Functionality

This test function verifies the fine tuning API endpoints. It creates a task via a POST request and retrieves it with a GET request to validate response details and timestamp behavior. The function uses freeze_time to simulate static time during tests.

Parameters

  • client: An instance of TestClient to perform HTTP calls.

Usage

  • Purpose: To ensure that tasks can be created and retrieved correctly, including proper handling of timestamps.

Example

Run the test using pytest in the project environment:

pytest -q --maxfail=1

test_fine_tuning_all

Functionality

This test verifies the complete fine tuning workflow of the API. It checks that the number of API requests matches the number of responses and validates expected HTTP status codes.

Parameters

  • client: An instance of TestClient for sending API requests.
  • params: An instance of Params containing requests, responses, and preload_data for initial task setup.

Usage

  • Purpose: To validate fine tuning endpoints via automated tests.

Example

Run this test with pytest by providing a proper TestClient instance and a correctly structured Params object.