Exemple #1
0
 def test_not_found(self):
     field = TextField(selector=".not-found")
     value = field.get_value(self.pq)
     self.assertIsNone(value)
Exemple #2
0
 def test_using_selector(self):
     field = TextField(selector=".link")
     value = field.get_value(self.pq)
     self.assertEqual(value, "Link text.")
Exemple #3
0
 def test_using_selector_with_eq(self):
     field = TextField(selector=".link:eq(1)")
     value = field.get_value(self.pq)
     self.assertEqual(value, "Another link.")
Exemple #4
0
 def test_no_selector(self):
     field = TextField()
     value = field.get_value(self.pq)
     self.assertEqual(value, "Some text. Link text. Another link.")
Exemple #5
0
 def test_not_found(self):
     field = TextField(selector=".not-found")
     value = field.get_value(self.pq)
     self.assertIsNone(value)
Exemple #6
0
 def test_using_selector_with_eq(self):
     field = TextField(selector=".link:eq(1)")
     value = field.get_value(self.pq)
     self.assertEqual(value, "Another link.")
Exemple #7
0
 def test_using_selector(self):
     field = TextField(selector=".link")
     value = field.get_value(self.pq)
     self.assertEqual(value, "Link text.")
Exemple #8
0
 def test_no_selector(self):
     field = TextField()
     value = field.get_value(self.pq)
     self.assertEqual(value, "Some text. Link text. Another link.")