I'm working on a user search feature and would like some feedback about the best way to structure the creation of test data using pytest. Below I have defined a test file, test_basic.py, that defines fixture functions to create users and add them to my "database" of users:
@pytest.fixture
def user_alice():
alice = User('Alice')
users.append(alice)
return alice