test helpers: remove redundant _get_item_count

It always returns 1.
This commit is contained in:
Šarūnas Nejus 2024-10-16 12:33:17 +01:00
parent 2681c83c5b
commit d161111342
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435
2 changed files with 3 additions and 9 deletions

View file

@ -246,16 +246,15 @@ class TestHelper(_common.Assertions):
The item is attached to the database from `self.lib`.
"""
item_count = self._get_item_count()
values_ = {
"title": "t\u00eftle {0}",
"artist": "the \u00e4rtist",
"album": "the \u00e4lbum",
"track": item_count,
"track": 1,
"format": "MP3",
}
values_.update(values)
values_["title"] = values_["title"].format(item_count)
values_["title"] = values_["title"].format(1)
values_["db"] = self.lib
item = Item(**values_)
if "path" not in values:
@ -372,12 +371,6 @@ class TestHelper(_common.Assertions):
return path
def _get_item_count(self):
if not hasattr(self, "__item_count"):
count = 0
self.__item_count = count + 1
return count
# Running beets commands
def run_command(self, *args, **kwargs):

View file

@ -91,6 +91,7 @@ class TestAuraResponse:
"artist": item.artist,
"size": Path(os.fsdecode(item.path)).stat().st_size,
"title": item.title,
"track": 1,
},
"relationships": {
"albums": {"data": [{"id": str(album.id), "type": "album"}]},