]> git.phdru.name Git - m_librarian.git/blob - tests/test_inp.py
Use pytest for testing
[m_librarian.git] / tests / test_inp.py
1
2 from tests import TestCase
3 from m_librarian.db import Author, Book
4
5
6 class TestInp(TestCase):
7     def test_import_bad_inpx(self):
8         self.assertRaises(ValueError, self.import_inpx, 'bad.inpx')
9
10     def test_import_inpx(self):
11         self.import_inpx('test.inpx')
12         self.assertEqual(Author.select().count(), 4)
13         self.assertEqual(Book.select().count(), 4)