0
0
mirror of https://github.com/thegeeklab/corenetworks.git synced 2024-11-21 21:20:38 +00:00

fix testing

This commit is contained in:
Robert Kaussow 2020-05-12 14:25:16 +02:00
parent 7a0d9c0a32
commit 4b563288fc
2 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,10 @@ from corenetworks.authenticators import CoreNetworksTokenAuth
def test_basic_auth(requests_mock):
requests_mock.post(
"https://beta.api.core-networks.de/auth/token",
json={"token": "mytoken"},
json={
"token": "mytoken",
"expires": 3600
},
)
auth = CoreNetworksBasicAuth(

View File

@ -17,7 +17,7 @@ from corenetworks.test.fixtures.callback import records_post_callback
@pytest.fixture
def client(mocker):
mocker.patch.object(CoreNetworksBasicAuth, "_login", return_value="testtoken")
mocker.patch.object(CoreNetworksBasicAuth, "_login", return_value=("testtoken", 3600))
client = CoreNetworks(user="testuser", password="testpass")
return client