示例#1
0
文件: tests.py 项目: giliam/sharbrary
 def test_ownership_new_other_ownership_someone_else(self):
     """Test the algorithm determining if a new ownership is necessary"""
     book = Book(title="Some annoying book")
     book.save()
     ownership = Ownership(book=book,owner=self.bib)
     existing_ownership = Ownership(book=book,owner=self.bob)
     self.assertTrue(determine_new_ownership_necessary(ownership,existing_ownership))
示例#2
0
文件: tests.py 项目: giliam/sharbrary
 def test_ownership_new_no_ownership(self):
     """Test the algorithm determining if a new ownership is necessary"""
     book = Book(title="Some annoying book")
     book.save()
     ownership = Ownership(book=book,owner=self.bib)
     self.assertTrue(determine_new_ownership_necessary(ownership,None))