Skip to content

Commit

Permalink
Merge pull request #5 from chelnak/Fix-Change-In-StatusCake-API-Response
Browse files Browse the repository at this point in the history
Data Fix for handling new response
  • Loading branch information
nbowes24 authored Oct 15, 2020
2 parents 86cadc2 + 57fe98d commit b2a1d7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions exporter/collectors/test_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

def parse_test_response(r, m):
t = []
for i in r.json():
tests = r.json()['data']
for i in tests:
t.append(
{
"test_id": str(i['TestID']),
Expand Down Expand Up @@ -65,7 +66,7 @@ def collect(self):
parsed_tests = parse_test_response(tests, m_test_id_flat_list)

#Exclude test_ids with active maintenance
test_id_list = [i['TestID'] for i in tests.json() if str(i['TestID']) not in m_test_id_flat_list]
test_id_list = [i['test_id'] for i in parsed_tests if str(i['test_id']) not in m_test_id_flat_list]
test_details = []
for i in test_id_list:
test_details.append(
Expand Down

0 comments on commit b2a1d7b

Please sign in to comment.