Skip to content

Commit

Permalink
Fix version mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineTChen committed Feb 1, 2021
1 parent 2610143 commit 3e1cf26
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion aerospike/tests/test_aerospike.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import time

import mock
Expand Down
7 changes: 1 addition & 6 deletions aerospike/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import copy
import os

import mock
import pytest
Expand All @@ -14,7 +13,6 @@
pytestmark = pytest.mark.unit


@pytest.mark.skipif(common.VERSION == '5.3.0.6', reason="Datacenter metrics not supported")
def test_datacenter_metrics(aggregator):
check = AerospikeCheck('aerospike', {}, [common.INSTANCE])
original_get_info = check.get_info
Expand All @@ -33,10 +31,7 @@ def mock_get_info(command, separator=";"):
check.collect_info = mock.MagicMock()
check.collect_throughput = mock.MagicMock()
check.collect_latency = mock.MagicMock()
if common.VERSION == '5.3.0.6':
check.collect_version = common.VERSION.split('.')
else:
check.collect_version = mock.MagicMock()
check.collect_version = common.VERSION.split('.')
check.check(None)
for metric in common.DATACENTER_METRICS:
aggregator.assert_metric(metric)
Expand Down

0 comments on commit 3e1cf26

Please sign in to comment.