forked from LBRYCommunity/lbry-sdk
clean up temporary conf file
This commit is contained in:
parent
e00238427b
commit
cfe5eb5d56
1 changed files with 9 additions and 3 deletions
|
@ -5,7 +5,7 @@ from twisted.trial import unittest
|
||||||
from lbrynet import conf
|
from lbrynet import conf
|
||||||
from lbrynet.core.Error import InvalidCurrencyError
|
from lbrynet.core.Error import InvalidCurrencyError
|
||||||
from lbrynet.tests import mocks
|
from lbrynet.tests import mocks
|
||||||
from lbrynet.tests.util import create_conf_file
|
from lbrynet.tests.util import create_conf_file, remove_conf_file
|
||||||
|
|
||||||
class SettingsTest(unittest.TestCase):
|
class SettingsTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -93,6 +93,12 @@ class SettingsTest(unittest.TestCase):
|
||||||
settings.load_conf_file_settings()
|
settings.load_conf_file_settings()
|
||||||
first = settings.get('lbryum_servers', data_type=conf.TYPE_PERSISTED)
|
first = settings.get('lbryum_servers', data_type=conf.TYPE_PERSISTED)
|
||||||
settings.save_conf_file_settings()
|
settings.save_conf_file_settings()
|
||||||
|
try:
|
||||||
settings.load_conf_file_settings()
|
settings.load_conf_file_settings()
|
||||||
|
except Exception, e:
|
||||||
|
remove_conf_file(conf_temp)
|
||||||
|
raise Exception(e)
|
||||||
second = settings.get('lbryum_servers', data_type=conf.TYPE_PERSISTED)
|
second = settings.get('lbryum_servers', data_type=conf.TYPE_PERSISTED)
|
||||||
|
remove_conf_file(conf_temp)
|
||||||
self.assertEqual(first, second)
|
self.assertEqual(first, second)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue