Skip to content

Commit

Permalink
fixup! tests(version): add tests to fintoc version header
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcumsille committed Apr 9, 2024
1 parent 27fb32d commit 7053901
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ class TestCoreFintocObject:
def test_object_creations(self):
# pylint: disable=protected-access
api_key = "super_secret_api_key"
api_version = "2023-01-01"
fintoc = Fintoc(api_key, api_version)
fintoc = Fintoc(api_key)
assert isinstance(fintoc._client, Client)
assert isinstance(fintoc.links, ManagerMixin)
assert isinstance(fintoc.webhook_endpoints, ManagerMixin)

def test_fintoc_creation_with_api_version(self):
# pylint: disable=protected-access
api_key = "super_secret_api_key"
api_version = "2023-01-01"
fintoc = Fintoc(api_key, api_version)
assert fintoc._client.headers["Fintoc-Version"] == api_version

def test_fintoc_creation_without_api_version(self):
# pylint: disable=protected-access
api_key = "super_secret_api_key"
fintoc = Fintoc(api_key)
assert "Fintoc-Version" not in fintoc._client.headers

0 comments on commit 7053901

Please sign in to comment.