mirror of
https://github.com/thegeeklab/corenetworks.git
synced 2024-11-21 21:20:38 +00:00
fix testing
This commit is contained in:
parent
7a0d9c0a32
commit
4b563288fc
@ -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(
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user