Skip to content

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Walshaw committed Sep 10, 2024
1 parent 48ff5f7 commit 6a152a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion GeoHealthCheck/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,8 @@ def load_data(file_path):
recipient = objects['recipients'][recipient_name]

recipient = Recipient(recipient['channel'], recipient['location'])
for resource_name in objects['recipients'][recipient_name]['resources']:
attached_resources = objects['recipients'][recipient_name]['resources']
for resource_name in attached_resources:
recipient.resources.append(resources[resource_name])

recipients[recipient_name] = recipient
Expand Down
8 changes: 6 additions & 2 deletions tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def testWebhookPayload(self):

# create a report from scratch as as local fixture for

recipient = Recipient.query.filter(Recipient.channel==Recipient.TYPE_WEBHOOK).first()
recipient = Recipient.query.filter(
Recipient.channel == Recipient.TYPE_WEBHOOK
).first()

resource = recipient.resources[0]

Expand Down Expand Up @@ -186,7 +188,9 @@ def testWebhookPayload(self):
'ghc.resource.type': resource.resource_type,
'ghc.resource.view': f'http://host/resource/{resource.identifier}',
'ghc.run.message': 'Failed',
'ghc.run.report': json.dumps(resource_result.get_report(), sort_keys=True),
'ghc.run.report': json.dumps(
resource_result.get_report(), sort_keys=True
),
}

responses.add(
Expand Down

0 comments on commit 6a152a8

Please sign in to comment.