Fix unrestored AutotagStub on two TestCases

* Call AutotagStub.restore() during the tearDown of
test_mbsubmit.MBSubmitPluginTest and test_plugins.PromptChoicesTest,
which could potentially lead to other tests calling mocked versions
of autotag.mb.match_album, .match_track, .album_for_id and .track_for_id
instead of the real functions.
This commit is contained in:
Diego Moreda 2016-01-22 21:33:33 +01:00
parent ba5b39cd46
commit b49426046a
2 changed files with 2 additions and 0 deletions

View file

@ -34,6 +34,7 @@ class MBSubmitPluginTest(TerminalImportSessionSetup, unittest.TestCase,
def tearDown(self):
self.unload_plugins()
self.teardown_beets()
self.matcher.restore()
def test_print_tracks_output(self):
"""Test the output of the "print tracks" choice."""

View file

@ -419,6 +419,7 @@ class PromptChoicesTest(TerminalImportSessionSetup, unittest.TestCase,
self.input_options_patcher.stop()
self.teardown_plugin_loader()
self.teardown_beets()
self.matcher.restore()
def test_plugin_choices_in_ui_input_options_album(self):
"""Test the presence of plugin choices on the prompt (album)."""