mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-15 20:41:49 -05:00
refactor existing handlers to be the related "real" handler classes, which are swapped out dynamically by external logger "proxy" handler class real handler swapout only done on setting change remove restart_local_services method get rid of uWSGI fifo file change TCP/UDP return type contract so that it mirrors the request futures object add details to socket error messages
24 lines
551 B
Python
24 lines
551 B
Python
import pytest
|
|
import logging
|
|
|
|
from mock import PropertyMock
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def _disable_database_settings(mocker):
|
|
m = mocker.patch('awx.conf.settings.SettingsWrapper.all_supported_settings', new_callable=PropertyMock)
|
|
m.return_value = []
|
|
|
|
|
|
@pytest.fixture()
|
|
def dummy_log_record():
|
|
return logging.LogRecord(
|
|
'awx', # logger name
|
|
20, # loglevel INFO
|
|
'./awx/some/module.py', # pathname
|
|
100, # lineno
|
|
'User joe logged in', # msg
|
|
tuple(), # args,
|
|
None # exc_info
|
|
)
|