Skip to content
Snippets Groups Projects
Commit 56a3b73f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[common][testutils] Added helper function to retrieve algorithms from data

parent d37e4654
No related branches found
No related tags found
2 merge requests!2551.4.x,!242Py3 compatibility
......@@ -126,3 +126,11 @@ class BaseTestCase(TestCase):
standard_codes = [400, 401, 403, 404, 405, 415]
if status_code not in standard_codes:
self.assertEqual(len(response.content), 0)
def get_algorithms_from_data(data, author_name):
"""
Retrieves the algorithms from author_name in data
"""
return [x for x in data if x['name'] == author_name]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment