Exemple #1
0
 def test_check_form_element_nodename_invalid(self):
     elem = {
         "name": "elemName",
         "value": "elemValue",
         "nodeName": "invalid"
     }
     self.assertFalse(Tracker.check_form_element(elem))
Exemple #2
0
 def test_check_form_element_type_valid(self):
     elem = {
         "name": "elemName",
         "value": "elemValue",
         "nodeName": "TEXTAREA",
         "type": "button"
     }
     self.assertTrue(Tracker.check_form_element(elem))
Exemple #3
0
 def test_check_form_element_no_name(self):
     elem = {"value": "elemValue", "nodeName": "INPUT"}
     self.assertFalse(Tracker.check_form_element(elem))
Exemple #4
0
 def test_check_form_element_no_type(self):
     elem = {"name": "elemName", "value": "elemValue", "nodeName": "INPUT"}
     self.assertTrue(Tracker.check_form_element(elem))