-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: GitHub <[email protected]>
- Loading branch information
1 parent
0db2b3f
commit 5bb6c13
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
"""Testing the client.""" | ||
|
||
from darbia.sns import SandSServices | ||
import pytest | ||
from darbia.sns import SandSServices | ||
|
||
|
||
def test_rejects_invalid_auth() -> None: | ||
"""Test that the client will recognize invalid auth.""" | ||
with pytest.raises(TypeError) as excinfo: | ||
SandSServices(base_url="",account_number="",token="") | ||
assert "Account number" in str(excinfo.value) | ||
SandSServices(base_url="", account_number="", token="") | ||
assert "Account number" in str(excinfo.value) | ||
with pytest.raises(TypeError) as excinfo: | ||
SandSServices(base_url="",account_number="2",token="") | ||
assert "Token" in str(excinfo.value) | ||
SandSServices(base_url="", account_number="2", token="") | ||
assert "Token" in str(excinfo.value) |