Ejemplo n.º 1
0
    def test_link_text_is_obj_title(self):
        html = fromstring(
            linked_without_icon(self.folder, self.folder.Title()))

        element = html.find('a')

        self.assertEqual(
            self.folder.Title(),
            element.text_content())
Ejemplo n.º 2
0
    def test_link_text_is_obj_title(self):
        html = fromstring(
            linked_without_icon(self.folder, self.folder.Title()))

        element = html.find('a')

        self.assertEqual(
            self.folder.Title(),
            element.text_content())
Ejemplo n.º 3
0
    def test_has_no_img_tag(self):
        html = fromstring(
            linked_without_icon(self.folder, self.folder.Title()))

        self.assertEqual([], html.xpath('a/img'))
Ejemplo n.º 4
0
    def test_has_link_with_obj(self):
        html = fromstring(
            linked_without_icon(self.folder, self.folder.Title()))

        self.assertEqual('a', html.find('a').tag)
Ejemplo n.º 5
0
    def test_has_link_if_called_with_a_brain(self):
        html = fromstring(linked_without_icon(self.brain, self.brain.Title))

        self.assertEqual('a', html.find('a').tag)
Ejemplo n.º 6
0
    def test_has_no_img_tag(self):
        html = fromstring(
            linked_without_icon(self.folder, self.folder.Title()))

        self.assertEqual([], html.xpath('a/img'))
Ejemplo n.º 7
0
    def test_has_link_with_obj(self):
        html = fromstring(
            linked_without_icon(self.folder, self.folder.Title()))

        self.assertEqual('a', html.find('a').tag)
Ejemplo n.º 8
0
    def test_has_link_if_called_with_a_brain(self):
        html = fromstring(linked_without_icon(self.brain, self.brain.Title))

        self.assertEqual('a', html.find('a').tag)