예제 #1
0
def mock_auth(resp_mock: aioresponses) -> None:
    resp_mock.post(urls.new_token(),
                   status=200,
                   payload={"body": {
                       "authToken": "123"
                   }})

    resp_mock.post(urls.authenticate(), status=200)

    resp_mock.post(urls.logout(), status=200)
예제 #2
0
def mock_auth(resp_mock: aioresponses) -> None:
    resp_mock.post(urls.new_token(),
                   status=200,
                   payload={'body': {
                       'authToken': '123'
                   }})

    resp_mock.post(urls.authenticate(), status=200)

    resp_mock.post(urls.logout(), status=200)
async def test_logout(manager: SystemManager) -> None:
    await manager.logout()
    _assert_calls(1, manager, [urls.logout()])