]> git.phdru.name Git - m_librarian.git/blobdiff - tests/test_inp.py
Refactoring: move import_inpx to TestCase
[m_librarian.git] / tests / test_inp.py
index ff3cfa4f0884905acf3a59e1ccea66a0a5c9ae38..595c46d0191f1389e85568c16fc6c748771a25c7 100755 (executable)
@@ -4,17 +4,14 @@
 import os
 from tests import TestCase, main
 from m_librarian.db import Author, Book
-from m_librarian.inp import import_inpx
 
 
 class TestInp(TestCase):
     def test_import_bad_inpx(self):
-        self.assertRaises(
-            ValueError, import_inpx,
-            os.path.join(os.path.dirname(__file__), 'bad.inpx'))
+        self.assertRaises(ValueError, self.import_inpx, 'bad.inpx')
 
     def test_import_inpx(self):
-        import_inpx(os.path.join(os.path.dirname(__file__), 'test.inpx'))
+        self.import_inpx('test.inpx')
         self.assertEqual(Author.select().count(), 4)
         self.assertEqual(Book.select().count(), 4)