예제 #1
0
 def test_parse_url_error(self):
     with HTTMock(error_mock):
         with self.assertRaises(URLParseError):
             title, image_urls = parse_url(self.url)
예제 #2
0
 def test_parse_url_error(self):
     with HTTMock(error_mock):
         with self.assertRaises(URLParseError):
             title, image_urls = parse_url(self.url)
예제 #3
0
    def test_parse_url(self):
        with HTTMock(thread_mock):
            title, image_urls = parse_url(self.url)

        self.assertEqual(title, u'蔡依林+心凌的綜合體?!19歲「無名時代的正妹」陳敬宣現在正翻了......')
        self.assertEqual(len(image_urls), 39)
예제 #4
0
    def test_parse_url(self):
        with HTTMock(thread_mock):
            title, image_urls = parse_url(self.url)

        self.assertEqual(title, u'蔡依林+心凌的綜合體?!19歲「無名時代的正妹」陳敬宣現在正翻了......')
        self.assertEqual(len(image_urls), 39)