mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <kevr@0cost.org>
This commit is contained in:
parent
15b1332656
commit
f2121fb833
1 changed files with 0 additions and 7 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Reference in a new issue