awx/awxkit/test/api/pages/test_base.py
Alan Rominger 6599f3f827 Removal of OAuth2 stuff from CLI
also from awxkit generally

Remove login command
2024-11-20 11:18:52 -05:00

22 lines
564 B
Python

from http.client import NOT_FOUND
import pytest
from awxkit.config import config
@pytest.fixture(autouse=True)
def setup_config(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(config, "credentials", {"default": {"username": "foo", "password": "bar"}}, raising=False)
monkeypatch.setattr(config, "base_url", "", raising=False)
@pytest.fixture
def response(mocker):
r = mocker.Mock()
r.status_code = NOT_FOUND
r.json.return_value = {
"token": "my_personal_token",
"access_token": "my_token",
}
return r