def test_parse_filesize(self):
    self.assertEqual(parse_filesize(None), None)
    self.assertEqual(parse_filesize(''), None)
    self.assertEqual(parse_filesize('91 B'), 91)
    self.assertEqual(parse_filesize('foobar'), None)
    self.assertEqual(parse_filesize('2 MiB'), 2097152)
    self.assertEqual(parse_filesize('5 GB'), 5000000000)
    self.assertEqual(parse_filesize('1.2Tb'), 1200000000000)
    self.assertEqual(parse_filesize('1.2tb'), 1200000000000)
    self.assertEqual(parse_filesize('1,24 KB'), 1240)
    self.assertEqual(parse_filesize('1,24 kb'), 1240)
    self.assertEqual(parse_filesize('8.5 megabytes'), 8500000)
def test_parse_filesize(self):
    self.assertEqual(parse_filesize(None), None)
    self.assertEqual(parse_filesize(), None)
    self.assertEqual(parse_filesize('91 B'), 91)
    self.assertEqual(parse_filesize('foobar'), None)
    self.assertEqual(parse_filesize('2 MiB'), 2097152)
    self.assertEqual(parse_filesize('5 GB'), 5000000000)
    self.assertEqual(parse_filesize('1.2Tb'), 1200000000000)
    self.assertEqual(parse_filesize('1.2tb'), 1200000000000)
    self.assertEqual(parse_filesize('1,24 KB'), 1240)
    self.assertEqual(parse_filesize('1,24 kb'), 1240)
    self.assertEqual(parse_filesize('8.5 megabytes'), 8500000)