Skip to content

Commit

Permalink
fix: IntegrityError in test_sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
JensZack committed Nov 21, 2024
1 parent ae6efdf commit a94d8e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_plexosdb_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import xml.etree.ElementTree as ET # noqa: N817
from plexosdb.enums import ClassEnum, CollectionEnum, Schema
from plexosdb.sqlite import PlexosSQLite
from sqlite3 import IntegrityError
from collections.abc import Generator
from pathlib import Path
from tempfile import TemporaryDirectory
Expand Down Expand Up @@ -178,7 +179,7 @@ def test_get_object_id(db):
assert gen_id == gen_id_get

# Add generator with same name and no category
with pytest.raises(ValueError):
with pytest.raises(IntegrityError):
gen_id = db.add_object(
gen_01_name,
ClassEnum.Generator,
Expand Down

0 comments on commit a94d8e3

Please sign in to comment.