group results by service using itertools

allows us to nicely reuse the existing format_statistics function
This commit is contained in:
Leo Hemsted
2016-08-19 16:36:20 +01:00
parent ebb13a1251
commit 00d19f63f0
3 changed files with 14 additions and 10 deletions

View File

@@ -207,7 +207,7 @@ def test_normal_api_key_returns_notifications_created_from_jobs_and_from_api(
notifications = json.loads(response.get_data(as_text=True))['notifications']
assert len(notifications) == 2
assert set(x['id'] for x in notifications) == set([str(sample_notification.id), str(api_notification.id)])
assert set(x['id'] for x in notifications) == {str(sample_notification.id), str(api_notification.id)}
@pytest.mark.parametrize('key_type', [KEY_TYPE_NORMAL, KEY_TYPE_TEAM, KEY_TYPE_TEST])