Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 9, 2021 12:25
Show Gist options
  • Save velotiotech/2eeab0f37bf5c5323a27a22df545647b to your computer and use it in GitHub Desktop.
Save velotiotech/2eeab0f37bf5c5323a27a22df545647b to your computer and use it in GitHub Desktop.
from product.models import Category
@pytest.mark.django_db
def test_create_category():
category = Category.objects.create(name="Books")
assert category.name == "Books"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment