Commit 458cdc50 authored by Felix Delattre's avatar Felix Delattre
Browse files

Added tests for configuration handling

parent 4f9f4459
Pipeline #29728 passed with stage
in 1 minute and 19 seconds
......@@ -18,7 +18,7 @@
from setuptools import setup, find_packages
tests_require = ["pytest"]
tests_require = ["pytest", "pytest-asyncio"]
linters_require = ["pylint", "pre-commit"]
setup(
......
overpass_base_url: https://overpass.openbuildingmap.org/api
filepath: ./tests/data/
state_filename: state.txt
rabotnik:
hostname: localhost
username: user
password: password
#!/usr/bin/env python3
# Copyright (C) 2021:
# Helmholtz-Zentrum Potsdam Deutsches GeoForschungsZentrum GFZ
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
# General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
import logging
from spearhead.configure import Configuration
logger = logging.getLogger()
def test_configuration_init():
config = Configuration("tests/config.yml")
assert config
assert config.state_filename == "state.txt"
assert config.rabotnik["hostname"] == "localhost"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment