Creating Some Tests: Additional Functions
Explore how to create comprehensive tests for Flask API functions by using application fixtures, generating random inputs, and verifying response codes. Understand testing methods that avoid network issues and ensure API reliability.
We'll cover the following...
We'll cover the following...
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 ...