Exclude application init from coverage measurement (main, BASE_URL)

This commit is contained in:
f4lco
2019-01-27 18:42:10 +01:00
parent 7e5879a6ba
commit 30e239c5fe
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ CACHE_TIMEOUT = 45 * 60
app = Flask(__name__)
app.url_map.strict_slashes = False
if 'BASE_URL' in os.environ:
if 'BASE_URL' in os.environ: # pragma: no cover
base_url = urlparse.urlparse(os.environ.get('BASE_URL'))
if base_url.scheme:
app.config['PREFERRED_URL_SCHEME'] = base_url.scheme