Skip to content

Commit

Permalink
Use dd_run_check in tests (DataDog#10658)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineTChen authored Nov 23, 2021
1 parent a620547 commit 99bffb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloud_foundry_api/tests/test_cloud_foundry_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def test_init_bad_instance(_):
@mock.patch.object(CloudFoundryApiCheck, "discover_api", return_value=("v3", "uaa_url"))
@mock.patch.object(CloudFoundryApiCheck, "get_orgs", return_value={"org_id": "org_name"})
@mock.patch.object(CloudFoundryApiCheck, "get_spaces", return_value={"space_id": "space_name"})
def test_check(_, __, ___, aggregator, instance, dd_events):
def test_check(_, __, ___, aggregator, instance, dd_events, dd_run_check):
with mock.patch.object(CloudFoundryApiCheck, "get_events", return_value=dd_events):
check = CloudFoundryApiCheck('cloud_foundry_api', {}, [instance])
check.check({})
dd_run_check(check)

aggregator.assert_metric(
"cloud_foundry_api.events.count",
Expand Down

0 comments on commit 99bffb1

Please sign in to comment.