remove obsolete tests

This commit is contained in:
Jann Stute
2024-11-28 19:18:42 +01:00
parent 2f9133754a
commit 7a3679d730

View File

@@ -1,36 +0,0 @@
import pytest
from src.core.library.alchemy.enums import FilterState
def test_filter_state_query(): # TODO TSQLANG can this test be removed?
# Given
query = "tag:foo"
state = FilterState.from_search_query(query)
# When
# assert state.tag == "foo"
@pytest.mark.parametrize(
["attribute", "comparator"],
[
("tag", str),
("tag_id", int),
("path", str),
("name", str),
("id", int),
],
)
def test_filter_state_attrs_compare(attribute, comparator): # TODO TSQLANG rework this test
# When
state = FilterState(**{attribute: "2"})
# Then
# compare the attribute value
assert getattr(state, attribute) == comparator("2")
# Then
for prop in ("tag", "tag_id", "path", "name", "id"):
if prop == attribute:
continue
assert not getattr(state, prop)