Esempio n. 1
0
    def test_class_index_2(self):
        re_type = re.compile('bmp$')
        tst_bmp = Types['image/x-bmp'] + Types['image/vnd.wap.wbmp'] + Types['image/x-win-bmp']
        self.assertEqual(sorted(tst_bmp), sorted(Types[re_type]))

        Types['image/bmp'][0].system = PLATFORM

        self.assertEqual([Type.from_array('image/x-bmp', ['bmp'])],
                         Types.m(re_type, {'platform': True}))
Esempio n. 2
0
    def test_class_index_2(self):
        re_type = re.compile('bmp$')
        tst_bmp = Types['image/x-bmp'] + Types['image/vnd.wap.wbmp'] + Types[
            'image/x-win-bmp']
        self.assertEqual(sorted(tst_bmp), sorted(Types[re_type]))

        Types['image/bmp'][0].system = PLATFORM

        self.assertEqual([Type.from_array('image/x-bmp', ['bmp'])],
                         Types.m(re_type, {'platform': True}))
Esempio n. 3
0
 def yaml_mime_type_from_array(self):
     return Type.from_array('text/x-yaml', ['yaml', 'yml'], '8bit', 'd9d172f608')
Esempio n. 4
0
 def yaml_mime_type_from_array(self):
     return Type.from_array('text/x-yaml', ['yaml', 'yml'], '8bit',
                            'd9d172f608')