def test_description_without_fullname(self): relatedstudent = mommy.make('core.RelatedExaminer', user__shortname='*****@*****.**', user__fullname='') selector = htmls.S(listbuilder_relatedexaminer.OnPeriodItemValue(value=relatedstudent).render()) self.assertFalse( selector.exists('.django-cradmin-listbuilder-itemvalue-titledescription-description'))
def test_description_with_fullname(self): relatedstudent = mommy.make('core.RelatedExaminer', user__fullname='Test User', user__shortname='*****@*****.**') selector = htmls.S(listbuilder_relatedexaminer.OnPeriodItemValue(value=relatedstudent).render()) self.assertEqual( '*****@*****.**', selector.one('.django-cradmin-listbuilder-itemvalue-titledescription-description').alltext_normalized)