Skip to content

Instantly share code, notes, and snippets.

Created June 9, 2021 12:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save velotiotech/3f508a1a42372d86a3f7e3887ca1fea2 to your computer and use it in GitHub Desktop.
from product.models import Category
def test_filter_category(db):
assert Category.objects.filter(name="Books").exists()
def test_update_category(db):
category = Category.objects.create(name="Books") = "DVDs"
category_from_db = Category.objects.get(name="DVDs")
assert == "DVDs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment