forked from LBRYCommunity/lbry-sdk
add directory encoding test in test_conf
This commit is contained in:
parent
2730aa9ad6
commit
7fb5b04bb4
1 changed files with 8 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
from lbrynet import conf
|
from lbrynet import conf
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,3 +53,11 @@ class SettingsTest(unittest.TestCase):
|
||||||
self.assertEqual('cli_test_string', settings['test'])
|
self.assertEqual('cli_test_string', settings['test'])
|
||||||
settings.set('test', 'runtime_takes_precedence', data_types=(conf.TYPE_RUNTIME,))
|
settings.set('test', 'runtime_takes_precedence', data_types=(conf.TYPE_RUNTIME,))
|
||||||
self.assertEqual('runtime_takes_precedence', settings['test'])
|
self.assertEqual('runtime_takes_precedence', settings['test'])
|
||||||
|
|
||||||
|
def test_data_dir(self):
|
||||||
|
# check if these directories are returned as string and not unicode
|
||||||
|
# otherwise there will be problems when calling os.path.join on
|
||||||
|
# unicode directory names with string file names
|
||||||
|
self.assertEqual(str, type(conf.default_download_directory))
|
||||||
|
self.assertEqual(str, type(conf.default_data_dir))
|
||||||
|
self.assertEqual(str, type(conf.default_lbryum_dir))
|
||||||
|
|
Loading…
Reference in a new issue