def test_logout(client_mock, config): """Simple logout case.""" store = Store(config.charmhub) result = store.logout() assert client_mock.mock_calls == [ call.clear_credentials(), ] assert result is None
def test_login(client_mock, config): """Simple login case.""" store = Store(config.charmhub) result = store.login() assert client_mock.mock_calls == [ call.clear_credentials(), call.get('/v1/whoami'), ] assert result is None