Add assert_startswith/endswith helper functions

This commit is contained in:
Hugo 2018-04-16 18:31:33 +03:00
parent fa601b8111
commit 60dea38d10
6 changed files with 23 additions and 17 deletions

View file

@ -107,8 +107,8 @@ class TestPyLastAlbum(PyLastTestCase):
image = album.get_cover_image()
# Assert
self.assertTrue(image.startswith("https://"))
self.assertTrue(image.endswith(".png"))
self.assert_startswith(image, "https://")
self.assert_endswith(image, ".png")
if __name__ == '__main__':