2 from tests import TestCase
3 from m_librarian.db import Author, Book
6 class TestInp(TestCase):
7 def test_import_bad_inpx(self):
8 self.assertRaises(ValueError, self.import_inpx, 'bad.inpx')
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)