sampel test for configuration

This commit is contained in:
Colin Goutte 2021-10-13 14:23:12 +02:00
parent f8550bbc36
commit 1d38cbfd9c
3 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,10 @@
[probe]
identitifant_sonde = 838266b2-fc3a-4430-95e8-f7f0d0fc9871
nom_sonde = SondeTest
emails = colin.goutte@free.fr
colin@cgoutte.fr

12
papi/config.py Normal file
View File

@ -0,0 +1,12 @@
import os
import glob
def read_config():
res = []
for relpath in glob.glob("confs/*.ini"):
if "/api_client" in relpath:
res.append(os.path.abspath(relpath))
return res

View File

@ -211,7 +211,8 @@ class ConfigurationTestCase(TestCase):
""" Check configuration parsing """
def test_get_config(self):
main.read_config()
config = main.read_config()
assert len(config) == 1
class CodeCoverageTestCase(TestCase):