mirror of
https://github.com/beetbox/beets.git
synced 2025-12-25 01:53:31 +01:00
add test to get item file of web plugin
This commit is contained in:
parent
fde2ad3f65
commit
6803ef3b83
1 changed files with 10 additions and 0 deletions
|
|
@ -667,6 +667,16 @@ class WebPluginTest(_common.LibTestCase):
|
|||
# Remove the item
|
||||
self.lib.get_item(item_id).remove()
|
||||
|
||||
def test_get_item_file(self):
|
||||
ipath = os.path.join(self.temp_dir, b'testfile2.mp3')
|
||||
shutil.copy(os.path.join(_common.RSRC, b'full.mp3'), ipath)
|
||||
self.assertTrue(os.path.exists(ipath))
|
||||
item_id = self.lib.add(Item.from_path(ipath))
|
||||
|
||||
response = self.client.get('/item/' + str(item_id) + '/file')
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
|
|
|||
Loading…
Reference in a new issue