def test_lowercase_ext(self): assert lowercase_ext('foo.txt') == 'foo.txt' assert lowercase_ext('FOO.TXT') == 'FOO.txt' assert lowercase_ext('foo') == 'foo' assert lowercase_ext('FOO') == 'FOO' assert lowercase_ext('archive.tar.gz') == 'archive.tar.gz' assert lowercase_ext('ARCHIVE.TAR.GZ') == 'ARCHIVE.TAR.gz' assert lowercase_ext('audio.m4a') == 'audio.m4a' assert lowercase_ext('AUDIO.M4A') == 'AUDIO.m4a'
def get_basename(self, filename): return lowercase_ext(self.secure_filename(filename))