mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-02 16:19:10 +00:00
remove obsolete tests
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user