Files
pygeoapi/tests/test_manager.py
T
Ricardo Garcia Silva 862e83da1f Process manager now knows about existing processes (#1277)
* Process manager now knows about existing processes

* get processes from the process manager rather than the config

* Move get_manager to base module

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2023-07-01 10:53:46 -04:00

32 lines
673 B
Python

from typing import Dict
import pytest
from pygeoapi.process.manager.base import get_manager
@pytest.fixture()
def config() -> Dict:
return {
'server': {
'manager': {
'name': 'TinyDB',
'output_dir': '/tmp',
}
},
'resources': {
'hello-world': {
'type': 'process',
'processor': {
'name': 'HelloWorld'
}
}
}
}
def test_get_manager(config):
manager = get_manager(config)
assert manager.name == config['server']['manager']['name']
assert 'hello-world' in manager.processes