예제 #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))