]> git.phdru.name Git - m_librarian.git/blobdiff - tests/test_format.py
Convert tests from unittest to pytest
[m_librarian.git] / tests / test_format.py
index 2710af97a1bbc236c83df28195c8c8c8a95b3e09..6b3aa363f3d440421b5657d09b9821dbe46a5e75 100644 (file)
@@ -1,17 +1,15 @@
 
 import os
-import unittest
 from m_librarian import download
 from m_librarian.config import get_config
 
 
-class TestFormat(unittest.TestCase):
-    def test_compile_format(self):
-        config_path = os.path.join(
-            os.path.dirname(__file__), 'test_config.conf')
-        get_config(config_path)
-        ml_conf = get_config()
-        ml_conf.set('download', 'format', '%a/%s/%n %t')
-        download._compile_format()
-        self.assertEqual(download.compiled_format,
-                         u'%(author)s/%(series)s/%(ser_no)d %(title)s')
+def test_compile_format():
+    config_path = os.path.join(
+        os.path.dirname(__file__), 'test_config.conf')
+    get_config(config_path)
+    ml_conf = get_config()
+    ml_conf.set('download', 'format', '%a/%s/%n %t')
+    download._compile_format()
+    assert download.compiled_format == \
+        u'%(author)s/%(series)s/%(ser_no)d %(title)s'