🥸fake
A basic instance of Faker to generate test data.
Last updated
def test_new_user_flow(py):
py.visit("https://some-page.com")
py.get("#email").type(py.fake.email())
py.get("#password").type(py.fake.password())
py.contains("Login").click()
assert py.contains("Success!")def test_fake_cc_expire(fake):
fake.credit_card_expire(start="now", end="+10y", date_format="%m/%y")
# '07/27'
def test_fake_address(fake):
fake.address()
# '00232 Isabel Creek\nReynoldsport, CA 05875'def test_a_page(py, fake):
py.visit("https://page.").get("#email").type(fake.email())from faker import Faker
fake = Faker()