Exemple #1
0
 def test_setup_mock_hack(self, responses):
     """If MUSICBRAINZ_MOCK is set, inject the mock"""
     if os.getenv('MUSICBRAINZ_MOCK', '').lower() not in (None,
                                                          'false', 'no'):
         # reticulating_splines()
         MusicbrainzQueries.inject_mock(musicbrainz)
         MusicbrainzQueries.link_shelve(responses)
         musicbrainz.DELAY = 0
Exemple #2
0
 def test_inject_mocks_hack(self, expected, mb):
     if os.getenv('MUSICBRAINZ_MOCK', '').lower() not in (None,
                                                          'false', 'no'):
         MusicbrainzQueries.inject_mock(acoustid.musicbrainz)
         MusicbrainzQueries.link_shelve(mb)
     if os.getenv('ACOUSTID_MOCK', '').lower() not in (None,
                                                       'false', 'no'):
         AcoustidQueries.inject_mock(acoustid)
         AcoustidQueries.link_shelve(expected)
Exemple #3
0
 def test_setup_mock_hack(self, responses):
     MusicbrainzQueries.raise_error(ws.WebServiceError)