rally/tests/functional
Dmitrii Shcherbakov 6cef6a9a03 Fix test_time_hook functional test
The problematic code that causes "TypeError: string indices must be integers":

 ->	self.assertEqual(
 	    expected,
 	    sorted(hook_results,
 	           key=lambda i: list(
 	               i["config"]["trigger"].values())[0]["unit"]))

(Pdb) hook_results[0]["config"]["trigger"]
{'name': 'event', 'args': {'unit': 'iteration', 'at': [5]}}

values[0] is not always a dict with a unit element:

(Pdb) hook_results[0]["config"]["trigger"].values()
dict_values(['event', {'unit': 'iteration', 'at': [5]}])

We should use args['args']['unit'] instead.

Change-Id: I42db6045ae88c34d3576beb737bb7e955c5f2132
Needed-By: I4991acccefd4754e209feafd5e24d03c76c283f8
2019-03-17 03:06:23 +03:00
..
2018-02-15 02:47:21 -08:00
2018-03-22 10:34:53 +00:00