mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Improve code coverage and API test cases for the Event Trigger module. Fixes #5088
This commit is contained in:
committed by
Akshay Joshi
parent
019932c323
commit
e9f16a29cf
@@ -1198,3 +1198,21 @@ def generate_scenarios(key, test_cases):
|
||||
tup = (test_name, dict(scenario))
|
||||
scenarios.append(tup)
|
||||
return scenarios
|
||||
|
||||
|
||||
def create_expected_output(parameters, actual_data):
|
||||
"""
|
||||
This function creates the dict using given parameter and actual data
|
||||
:param parameters:
|
||||
:param actual_data:
|
||||
:return: expected data
|
||||
:type: dict
|
||||
"""
|
||||
expected_output = {}
|
||||
|
||||
for key in parameters:
|
||||
for value in actual_data:
|
||||
expected_output[key] = value
|
||||
actual_data.remove(value)
|
||||
break
|
||||
return expected_output
|
||||
|
||||
Reference in New Issue
Block a user