Skip to content

Commit

Permalink
test: remove unused code in test_object_id
Browse files Browse the repository at this point in the history
  • Loading branch information
JensZack committed Nov 21, 2024
1 parent a64377b commit 886a499
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test_plexosdb_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,14 @@ def test_get_object_id(db):
gen_id_get = db.get_object_id(gen_01_name, class_name=ClassEnum.Generator)
assert gen_id == gen_id_get

# Add generator with same name different category
# Add generator with same name and no category
with pytest.raises(ValueError):
gen_01_name = "gen1"
gen_id = db.add_object(
gen_01_name,
ClassEnum.Generator,
CollectionEnum.Generators,
description="Test Gen",
)
# for a given class, all names should be unique
_ = db.get_object_id(gen_01_name, class_name=ClassEnum.Generator)

max_rank = db.get_category_max_id(ClassEnum.Generator)
assert max_rank == 2 # Data has ranks 0, 1. 2 is with the new category
Expand Down

0 comments on commit 886a499

Please sign in to comment.