862e83da1f
* 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>
32 lines
673 B
Python
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
|