pytest-faker adds Faker fixtures for easy use of Faker for your tests under pytest runner.
Attention!
This plugin is included in the faker itself. This repository is not supported since then.
pip install pytest-faker
An example of Faker and pytest integration.
tests/test_faker.py:
from faker.generator import Generator
def test_faker(faker):
"""Faker factory is a fixture."""
assert isinstance(faker, Generator)
assert isinstance(faker.name(), str)
This software is licensed under the MIT license.
© 2015 Anatoly Bubenkov, Oleg Pidsadnyi and others