smbmc/tests/unit/test_client.py

20 lines
508 B
Python
Raw Normal View History

2020-10-31 16:57:30 +00:00
"""Unit tests for smbmc.Client class."""
import pytest
from smbmc import Client
# TODO stub out request call
client = Client("", "", "")
def test_duplicate_metrics():
"""Check for duplicate metrics."""
with pytest.raises(Exception, match="duplicates"):
assert client.get_metrics(["dupe", "dupe"])
def test_invalid_metrics():
"""Check for invalid metrics."""
with pytest.raises(Exception, match="invalid metric"):
assert client.get_metrics([None, 1, "magic_school_bus"])