Example #1
0
    def test_06_get_single_image(self):
        """
        Test getting an single image from test_album.
        """

        imgurUtil = ImgurUtil()
        album_title = 'test_album'
        album_hash = imgurUtil.get_album_hash(album_title)
        imgurUtil.set_album_hash(album_hash)
        response = imgurUtil.get_image_description('Catterpillar')
        description = 'Catterpillar'
        self.assertEqual(response, description)
Example #2
0
    def test_07_get_multiple_image(self):
        """
        Test getting multiple image from test_album.
        """

        imgurUtil = ImgurUtil()
        album_title = 'test_album'
        album_hash = imgurUtil.get_album_hash(album_title)
        imgurUtil.set_album_hash(album_hash)

        des1 = 'Catterpillar'
        image1_des = imgurUtil.get_image_description(des1)

        des2 = 'Sea and mountain'
        image2_des = imgurUtil.get_image_description(des2)

        des3 = 'Catty'
        image3_des = imgurUtil.get_image_description(des3)

        self.assertEqual(image1_des, des1)
        self.assertEqual(image2_des, des2)
        self.assertEqual(image3_des, des3)