]> git.phdru.name Git - m_librarian.git/blob - tests/test_inp.py
595c46d0191f1389e85568c16fc6c748771a25c7
[m_librarian.git] / tests / test_inp.py
1 #! /usr/bin/env python
2
3
4 import os
5 from tests import TestCase, main
6 from m_librarian.db import Author, Book
7
8
9 class TestInp(TestCase):
10     def test_import_bad_inpx(self):
11         self.assertRaises(ValueError, self.import_inpx, 'bad.inpx')
12
13     def test_import_inpx(self):
14         self.import_inpx('test.inpx')
15         self.assertEqual(Author.select().count(), 4)
16         self.assertEqual(Book.select().count(), 4)
17
18
19 if __name__ == "__main__":
20     main()