mirror of
https://github.com/Eledio/superfaktura-client.git
synced 2025-11-01 00:18:25 +01:00
test_client_contact: add api credinitials
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
import pytest # type: ignore
|
import pytest # type: ignore
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from superfaktura.client_contacts import (
|
from superfaktura.client_contacts import (
|
||||||
@@ -9,6 +11,15 @@ from superfaktura.client_contacts import (
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def client_contact():
|
def client_contact():
|
||||||
|
with patch.dict(
|
||||||
|
os.environ,
|
||||||
|
{
|
||||||
|
"SUPERFAKTURA_API_KEY": "test_key",
|
||||||
|
"SUPERFAKTURA_API_URL": "https://api.superfaktura.cz",
|
||||||
|
"SUPERFAKTURA_API_EMAIL": "test_email",
|
||||||
|
"SUPERFAKTURA_API_COMPANY_ID": "test_company_id",
|
||||||
|
},
|
||||||
|
):
|
||||||
with patch("superfaktura.client_contacts.ClientContact", return_value=None):
|
with patch("superfaktura.client_contacts.ClientContact", return_value=None):
|
||||||
return ClientContact()
|
return ClientContact()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user