Ignore:
Timestamp:
8 Nov 2011, 21:31:37 (13 years ago)
Author:
uli
Message:

Bring test coverage for applicant.py back to 100%.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/ulif-extimgstore/src/waeup/sirp/applicants/tests/test_applicant.py

    r7037 r7040  
    134134        return
    135135
     136    def test_name_chooser_check_name(self):
     137        # we can check file ids for applicants
     138        appl = Applicant()
     139        appl.reg_no = u'MY_REG_NO'
     140        fake_container = grok.Container()
     141        fake_container.__name__ = 'folder'
     142        fake_container['appl'] = appl
     143        appl.__parent__ = fake_container
     144        chooser = IFileStoreNameChooser(appl)
     145        result1 = chooser.checkName('foo')
     146        result2 = chooser.checkName('__img-applicant__folder/MY_REG_NO.jpg')
     147        self.assertEqual(result1, False)
     148        self.assertEqual(result2, True)
     149        return
     150
    136151class ResultEntryTest(unittest.TestCase):
    137152
Note: See TracChangeset for help on using the changeset viewer.