from test_imports import * class BooksTest(unittest.TestCase): def setUp(self): self.books = Books('My Books', 'sqlite:///') def test_books_has_a_name(self): self.assertEquals('My Books', self.books.name()) def test_cant_make_books_without_a_name(self): """docstring for test_cant_make_books_without_a_name""" self.assertRaises(Exception, Books) def test_empty_books_has_no_accounts(self): self.assertEquals([], self.books.accounts()) def test_add_account(self): account = Account('Jane', 'USD') self.books.add_account(account) self.assertEquals([account], self.books.accounts()) def test_empty_books_has_no_activities(self): self.assertEquals([], self.books.activities()) #def test_saving_actually_updates_database(self): # assert False if __name__ == '__main__': unittest.main()