Changeset 11659 for main


Ignore:
Timestamp:
19 May 2014, 17:30:13 (11 years ago)
Author:
uli
Message:

Add fileformat checker tests for '.fpm' format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_helpers.py

    r10676 r11659  
    373373            os.path.dirname(__file__), 'sample_pdf_valid.pdf')
    374374        self.valid_pdf = open(self.valid_pdf_path, 'rb').read()
     375        self.valid_fpm_path = os.path.join(
     376            os.path.dirname(__file__), 'sample_fpm_valid.fpm')
     377        self.valid_fpm = open(self.valid_fpm_path, 'rb').read()
    375378        return
    376379
     
    413416        self.assertEqual(
    414417            helpers.get_fileformat(None, self.valid_pdf), 'pdf')
     418        return
     419
     420    def test_fpm(self):
     421        # we recognize fpm files.
     422        # fpm files are binary fingerprint data produced by libfprint.
     423        self.assertEqual(
     424            helpers.get_fileformat(self.valid_fpm_path), 'fpm')
     425        self.assertEqual(
     426            helpers.get_fileformat(None, self.valid_fpm), 'fpm')
    415427        return
    416428
Note: See TracChangeset for help on using the changeset viewer.