fix clean in test_settings

This commit is contained in:
Kay0u 2021-04-13 16:43:53 +02:00
parent 6745fce647
commit ab834f1885
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -1,5 +1,6 @@
import os import os
import json import json
import glob
import pytest import pytest
from yunohost.utils.error import YunohostError from yunohost.utils.error import YunohostError
@ -28,6 +29,8 @@ def setup_function(function):
def teardown_function(function): def teardown_function(function):
os.system("mv /etc/yunohost/settings.json.saved /etc/yunohost/settings.json") os.system("mv /etc/yunohost/settings.json.saved /etc/yunohost/settings.json")
for filename in glob.glob("/etc/yunohost/settings-*.json"):
os.remove(filename)
def test_settings_get_bool(): def test_settings_get_bool():