sampel test for configuration
This commit is contained in:
parent
f8550bbc36
commit
1d38cbfd9c
|
@ -0,0 +1,10 @@
|
|||
[probe]
|
||||
identitifant_sonde = 838266b2-fc3a-4430-95e8-f7f0d0fc9871
|
||||
nom_sonde = SondeTest
|
||||
emails = colin.goutte@free.fr
|
||||
colin@cgoutte.fr
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue