]> git.phdru.name Git - m_librarian.git/blob - tests/test_format.py
Pass format of the downloaded file name in the command line
[m_librarian.git] / tests / test_format.py
1 #! /usr/bin/env python
2
3
4 import unittest
5 from tests import main
6 from m_librarian import config, download
7
8
9 class TestFormat(unittest.TestCase):
10     def test_compile_format(self):
11         config.get_config().set('download', 'format', '%a/%s/%n %t')
12         download._compile_format()
13         self.assertEqual(download.compiled_format,
14                          u'%(author)s/%(series)s/%(ser_no)d %(title)s')
15
16
17 if __name__ == "__main__":
18     main()