Conditions | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | import unittest |
||
28 | @httpretty.activate |
||
29 | def test_get_cover_no_results(self): |
||
30 | # No results response |
||
31 | httpretty.register_uri(httpretty.GET, |
||
32 | "https://itunes.apple.com/search/?limit=1&entity=musicArtist%2CmusicTrack%2Calbum%2Cmix%2Csong&term=Such+Fake+Album+Pls&media=music", |
||
33 | body=open(self.empty_response).read(), |
||
34 | content_type="application/json") |
||
35 | |||
36 | # Assert a NoResultsException |
||
37 | with self.assertRaises(coverpy.exceptions.NoResultsException): |
||
38 | self.coverpy.get_cover("Such Fake Album Pls") |
||
39 | |||
41 | unittest.main() |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.