예제 #1
0
 def test_is_known_issue_for_not_known(self):
     """
     Should be False if is_known_issue is False.
     """
     note = models.Note(is_known_issue=False)
     release = Mock(spec=models.Release())
     eq_(note.is_known_issue_for(release), False)
예제 #2
0
 def test_is_known_issue_for(self):
     """
     Should be False if is_known_issue is True and fixed_in_release
     matches the given release.
     """
     release = Mock(spec=models.Release())
     note = models.Note(is_known_issue=True, fixed_in_release=release)
     eq_(note.is_known_issue_for(release), False)
예제 #3
0
 def test_is_known_issue_for_wrong_release(self):
     """
     Should be True if is_known_issue is True but fixed_in_release
     doesn't match given release.
     """
     fixed_release = Mock(spec=models.Release())
     release = Mock(spec=models.Release())
     note = models.Note(is_known_issue=True, fixed_in_release=fixed_release)
     eq_(note.is_known_issue_for(release), True)
예제 #4
0
 def test_unicode(self):
     """
     Should equal note
     """
     note = models.Note(note='test')
     eq_(unicode(note), 'test')