Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 9, 2021 12:36
Show Gist options
  • Save velotiotech/3b2badc0592ee397e0be57eaba3df05d to your computer and use it in GitHub Desktop.
Save velotiotech/3b2badc0592ee397e0be57eaba3df05d to your computer and use it in GitHub Desktop.
@pytest.fixture(scope="module")
def category(db) -> Category:
return Category.objects.create(name="Books")
@pytest.fixture(scope="module")
def retailer_abc(db):
return Retail.objects.create(name="ABC")
@pytest.fixture(scope="module")
def product_one(product_factory):
return product_factory(name="Book 1", mrp="100.2")
@pytest.fixture(scope="module")
def product_two(product_factory):
return product_factory(name="Novel Book", mrp="51")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment