Пример #1
0
 def test_check_form_element_nodename_invalid(self):
     elem = {
         "name": "elemName",
         "value": "elemValue",
         "nodeName": "invalid"
     }
     self.assertFalse(Tracker.check_form_element(elem))
Пример #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))
Пример #3
0
 def test_check_form_element_no_name(self):
     elem = {"value": "elemValue", "nodeName": "INPUT"}
     self.assertFalse(Tracker.check_form_element(elem))
Пример #4
0
 def test_check_form_element_no_type(self):
     elem = {"name": "elemName", "value": "elemValue", "nodeName": "INPUT"}
     self.assertTrue(Tracker.check_form_element(elem))