2 File in charge of testing the boilerplate Boilerplate non http class.
7import constants
as TCONST
10sys.path.append(os.getcwd())
14except ImportError
as e:
15 raise ImportError(
"Failed to import the src module")
from e
19SUCCESS = TCONST.SUCCESS
26 "SELECT * FROM table;",
36def _run_test(array: List[str], function: object, expected_response: bool =
False) ->
None:
37 """ Run a test and return it's status"""
39 response = function(i)
40 assert response == expected_response
45 Function in charge of testing the logic gate for sql injection.
48 array=SQLII.logic_gates,
49 function=SQLII.check_if_logic_gate_sql_injection,
50 expected_response=
True
56 Function in charge of testing the command for sql injection.
60 function=SQLII.check_if_command_sql_injection,
61 expected_response=
True
67 Function in charge of testing the symbol for sql injection.
71 function=SQLII.check_if_symbol_sql_injection,
72 expected_response=
True
78 Function in charge of testing the list of all sql injections.
82 function=SQLII.check_if_sql_injection,
83 expected_response=
True
89 Function in charge of testing the list of all sql injections in strings.
93 function=SQLII.check_if_injections_in_strings,
94 expected_response=
True
100 Function in charge of testing the list of all sql injections in strings.
103 array=[SQLII.all, SQLII.all],
104 function=SQLII.check_if_injections_in_strings,
105 expected_response=
True
111 Function in charge of testing the list of a series of sentences
115 function=SQLII.check_if_sql_injection,
116 expected_response=
True,
None _run_test(List[str] array, object function, bool expected_response=False)
None test_if_logic_gate_sql_injection_list_logic_gates()
None test_if_injections_in_strings_list_list_all()
None test_if_sql_injection_list_sentence()
None test_if_sql_injection_list_all()
None test_if_injections_in_strings_list_list_all_list_all()
None test_if_command_sql_injection_list_keywords()
None test_if_symbol_sql_injection_list_symbols()