4 from m_librarian import download
5 from m_librarian.config import get_config
8 class TestFormat(unittest.TestCase):
9 def test_compile_format(self):
10 config_path = os.path.join(
11 os.path.dirname(__file__), 'test_config.conf')
12 get_config(config_path)
13 ml_conf = get_config()
14 ml_conf.set('download', 'format', '%a/%s/%n %t')
15 download._compile_format()
16 self.assertEqual(download.compiled_format,
17 u'%(author)s/%(series)s/%(ser_no)d %(title)s')