Commit f2121fb8 authored by Kevin Morris's avatar Kevin Morris
Browse files

simplify test_package_keyword.py



We no longer need to delete records like this; in fact, it causes
errors now. Fix this by removing the deletions and allow
setup_test_db to do it's job.

We'll need to do this for other tests as well.
Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 15b13326
......@@ -29,20 +29,13 @@ def setup():
yield pkgbase
from aurweb.db import session
session.delete(pkgbase)
session.commit()
def test_package_keyword():
from aurweb.db import session
pkg_keyword = create(PackageKeyword,
PackageBase=pkgbase,
Keyword="test")
assert pkg_keyword in pkgbase.keywords
assert pkgbase == pkg_keyword.PackageBase
session.delete(pkg_keyword)
session.commit()
def test_package_keyword_null_pkgbase_raises_exception():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment