Search⌘ K
AI Features

Creating Some Tests: Additional Functions

Explore how to create additional tests for your web application by setting up an application fixture and using API test calls. Learn to verify proper responses, handle edge cases like invalid inputs, and ensure your app's robustness without relying on network connectivity.

To create a test, we can exercise the method in the previous lesson repeatedly to see if the assertion ever fails. We do this by creating a new file called api_test.py and placing it in the langman directory.

Application fixture

In this file, we begin by constructing an application fixture. This allows us to work with the ...