Skip to content

Commit

Permalink
fix: pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
tengzl33t committed May 2, 2024
1 parent 959cf4e commit 0eaca26
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

class TestClient(TestCase):
"""Main API Client test class."""

@classmethod
def setUpClass(cls) -> None:
"""Setting up Main API Client class for tests."""
Expand Down Expand Up @@ -51,11 +52,13 @@ def test_sites_incorrect_command(self):
def test_list_sites_incorrect_customer(self):
"""Test for incorrect customer in payload provided."""
client = Client(self.api_env, self.api_key_prod)
with self.assertRaises(TXAPIResponseError):
client.sites({
"command": "list",
"customer_name": "fffamogus"
})

response = client.sites({
"command": "list",
"customer_name": "fffamogus"
})

assert isinstance(response, TXAPIResponseError)

def test_list_sites(self):
"""Test for 'sites' method 'list' command."""
Expand Down

0 comments on commit 0eaca26

Please sign in to comment.