mirror of
https://github.com/beetbox/beets.git
synced 2026-02-21 14:56:02 +01:00
test helpers: remove redundant _get_item_count
It always returns 1.
This commit is contained in:
parent
2681c83c5b
commit
d161111342
2 changed files with 3 additions and 9 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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"}]},
|
||||
|
|
|
|||
Loading…
Reference in a new issue