tests: Read functional tests conf file without assuming CWD

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-03-05 11:18:44 -08:00 committed by James Valleroy
parent b66b15591e
commit 0e2315486d
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -17,9 +17,10 @@
import configparser
import os
import pathlib
config = configparser.ConfigParser()
config.read('config.ini')
config.read(pathlib.Path(__file__).parent.with_name('config.ini'))
config['DEFAULT']['url'] = os.environ.get('FREEDOMBOX_URL',
config['DEFAULT']['url'])