mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 20:13:37 +01:00
Correct tests for export mode
The old tests were wrong but the incorrectness was hidden by the incorrect parameter passing fixed in the previous commit. Now we actually test that the item's path did not change.
This commit is contained in:
parent
714560aace
commit
730c84e5e5
1 changed files with 5 additions and 18 deletions
|
|
@ -501,36 +501,23 @@ class ExportTest(_common.TestCase):
|
|||
commands.move_items(self.lib, dest, query, copy, album,
|
||||
pretend, export=export)
|
||||
|
||||
def test_export_item(self):
|
||||
self._move()
|
||||
self.i.load()
|
||||
self.assertTrue(b'testlibdir' in self.i.path)
|
||||
self.assertExists(self.i.path)
|
||||
self.assertNotExists(self.itempath)
|
||||
|
||||
def test_export_item_custom_dir(self):
|
||||
self._move(dest=self.otherdir)
|
||||
self.i.load()
|
||||
self.assertTrue(b'testotherdir' in self.i.path)
|
||||
self.assertExists(self.i.path)
|
||||
self.assertNotExists(self.itempath)
|
||||
self.assertEqual(self.i.path, self.itempath)
|
||||
self.assertExists(self.otherdir)
|
||||
|
||||
def test_export_album_custom_dir(self):
|
||||
self._move(dest=self.otherdir, album=True)
|
||||
self.i.load()
|
||||
self.assertTrue(b'testotherdir' in self.i.path)
|
||||
self.assertExists(self.i.path)
|
||||
self.assertNotExists(self.itempath)
|
||||
self.assertEqual(self.i.path, self.itempath)
|
||||
self.assertExists(self.otherdir)
|
||||
|
||||
def test_pretend_export_item(self):
|
||||
self._move(dest=self.otherdir, pretend=True)
|
||||
self.i.load()
|
||||
self.assertIn(b'srcfile', self.i.path)
|
||||
|
||||
def test_pretend_export_album(self):
|
||||
self._move(album=True, pretend=True)
|
||||
self.i.load()
|
||||
self.assertIn(b'srcfile', self.i.path)
|
||||
self.assertNotExists(self.otherdir)
|
||||
|
||||
|
||||
class UpdateTest(_common.TestCase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue