Ignore:
Timestamp:
20 Mar 2017, 09:35:50 (8 years ago)
Author:
Henrik Bettermann
Message:

Change name of fingerprint minutiae files in order to be compatible with the fingerprint viewlet download_names in the waeup.uniben custom package.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py

    r12110 r14637  
    435435        self.assertEqual(result, True)
    436436        stored_file = getUtility(IExtFileStore).getFileByContext(
    437             self.student, attr="1.fpm")
     437            self.student, attr="finger1.fpm")
    438438        self.assertEqual(stored_file.read(), 'FP1faked_fpm')
    439439
     
    449449        self.assertEqual(result, True)
    450450        stored_file1 = getUtility(IExtFileStore).getFileByContext(
    451             self.student, attr="1.fpm")
     451            self.student, attr="finger1.fpm")
    452452        stored_file2 = getUtility(IExtFileStore).getFileByContext(
    453             self.student, attr="3.fpm")
     453            self.student, attr="finger3.fpm")
    454454        self.assertEqual(stored_file1.read(), 'FP1faked_fpm1')
    455455        self.assertEqual(stored_file2.read(), 'FP1faked_fpm2')
     
    490490        server = ServerProxy('http://mgr:mgrpw@localhost/app')
    491491        self.setup_student(self.student)
    492         self.create_fpm_file(self.student, '1')
     492        self.create_fpm_file(self.student, 'finger1')
    493493        result = server.get_student_fingerprints(self.student.student_id)
    494494        self.assertTrue('1' in result['fingerprints'].keys())
  • main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py

    r11674 r14637  
    292292            file_store = getUtility(IExtFileStore)
    293293            file_id = IFileStoreNameChooser(student).chooseName(
    294                 attr='%s.fpm' % num)
     294                attr='finger%s.fpm' % num)
    295295            file_store.createFile(file_id, StringIO(val.data))
    296296            result = True
     
    334334        for num in [str(x + 1) for x in range(10)]:
    335335            fp_file = file_store.getFileByContext(
    336                 student, attr='%s.fpm' % num)
     336                student, attr='finger%s.fpm' % num)
    337337            if fp_file is not None:
    338338                result['fingerprints'][num] = xmlrpclib.Binary(fp_file.read())
Note: See TracChangeset for help on using the changeset viewer.