PackageBase.package -> PackageBase.packages

A PackageBase can have more than one package
associated with it.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-06-28 08:22:34 -07:00
parent 3c6b2203e9
commit f8d2d4c82a
2 changed files with 2 additions and 18 deletions

View file

@ -1,9 +1,7 @@
import pytest
from sqlalchemy import and_
from sqlalchemy.exc import IntegrityError, OperationalError
import aurweb.config
from sqlalchemy.exc import IntegrityError
from aurweb.db import create, query
from aurweb.models.account_type import AccountType
@ -57,20 +55,6 @@ def test_package():
assert record is not None
def test_package_package_base_cant_change():
""" Test case insensitivity of the database table. """
if aurweb.config.get("database", "backend") == "sqlite":
return None # SQLite doesn't seem handle this.
from aurweb.db import session
with pytest.raises(OperationalError):
create(Package,
PackageBase=pkgbase,
Name="invalidates-old-package-packagebase-relationship")
session.rollback()
def test_package_null_pkgbase_raises_exception():
from aurweb.db import session