Skip to content

Commit

Permalink
Call constructor of SavedSearch directly in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
picsel2 committed Mar 11, 2024
1 parent fbf6120 commit 2a2ce13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions GTG/core/saved_searches.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ def __init__(self, id: UUID, name: str, query: str) -> None:

super().__init__()

# TODO probably not needed
@classmethod
def create(cls, name: str, query: str) -> 'SavedSearch':
return cls(uuid4(), name, query)

@GObject.Property(type=str)
def name(self) -> str:
"""Read only property."""
Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_saved_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def test_xml_load_tree(self):
def test_xml_write_simple(self):

store = SavedSearchStore()
search1 = store.add(SavedSearch.create('Some @tag', 'Looking for some tag'))
search2 = store.add(SavedSearch.create('Some @other @tag', 'Looking for more'))
search1 = store.add(SavedSearch(uuid4(), 'Some @tag', 'Looking for some tag'))
search2 = store.add(SavedSearch(uuid4(), 'Some @other @tag', 'Looking for more'))

xml_root = store.to_xml()

Expand Down

0 comments on commit 2a2ce13

Please sign in to comment.