예제 #1
0
파일: wsgi.py 프로젝트: AdamDz/pail
 def __init__(self, app, global_conf, resolutions=DEFAULT_RESOLUTIONS):
     self.app = app
     self.global_conf = global_conf
     self.acceptable_types = [
         'image/jpeg', 'image/png', 'image/gif']
     try:
         self.resolutions = to_int_list(resolutions)
     except:
         raise ValueError('resolutions must be a comma-separated'
                          'list of integers')
     pass
예제 #2
0
파일: test_helpers.py 프로젝트: AdamDz/pail
 def test_to_int_list(self):
     # we can turn strings into lists of integers
     self.assertEqual(to_int_list('1, 2, 3'), [1, 2, 3])
     self.assertEqual(to_int_list('123'), [123])
     return