mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-04-19 08:55:15 +00:00
Add documentation that covers: - configuration - prediction Add Python scripts that support automatic documentation generation for configuration data defined with pydantic. Adapt EOS configuration to provide more methods for REST API and automatic documentation generation. Adapt REST API to allow for EOS configuration file load and save. Sort REST API on generation of openapi markdown for docs. Move logutil to core/logging to allow configuration of logging by standard config. Make Akkudoktor predictions always start extraction of prediction data at start of day. Previously extraction started at actual hour. This is to support the code that assumes prediction data to start at start of day. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
14 lines
345 B
Python
14 lines
345 B
Python
from http import HTTPStatus
|
|
|
|
import requests
|
|
|
|
|
|
def test_server(server, config_eos):
|
|
"""Test the server."""
|
|
# validate correct path in server
|
|
assert config_eos.data_folder_path is not None
|
|
assert config_eos.data_folder_path.is_dir()
|
|
|
|
result = requests.get(f"{server}/v1/config")
|
|
assert result.status_code == HTTPStatus.OK
|