'Test long file names'

def test_long_filenames(self):

    cache = self.init_cache()
    cache.set_field(u'title', {1: (u'a' * 10000)})
    self.assertLessEqual(len(cache.field_for(u'path', 1)), (cache.backend.PATH_LIMIT * 2))
    cache.set_field(u'authors', {1: (u'b' * 10000)})
    self.assertLessEqual(len(cache.field_for(u'path', 1)), (cache.backend.PATH_LIMIT * 2))
    fpath = cache.format_abspath(1, cache.formats(1)[0])
    self.assertLessEqual(len(fpath), (len(cache.backend.library_path) + (cache.backend.PATH_LIMIT * 4)))
