'Test is_media_file'

def test_is_media_file(self):

    temp_name = 'Show.Name.S01E01.HDTV.x264-RLSGROUP'
    extension_tests = {'.'.join((temp_name, ext)): True for ext in MEDIA_EXTENSIONS}
    other_extensions = ['txt', 'sfv', 'srr', 'rar', 'nfo', 'zip']
    extension_tests.update({'.'.join((temp_name, ext)): False for ext in (other_extensions + SUBTITLE_EXTENSIONS)})
    sample_tests = {'Show.Name.S01E01.HDTV.sample.mkv': False, 'Show.Name.S01E01.HDTV.sAmPle.mkv': False, 'Show.Name.S01E01.HDTV.samples.mkv': True, 'Show.Name.S01E01.HDTVsample.mkv': True, 'Sample.Show.Name.S01E01.HDTV.mkv': False, 'Show.Name.Sample.S01E01.HDTV.sample.mkv': False, 'Show.Name.S01E01.HDTV.sample1.mkv': False, 'Show.Name.S01E01.HDTV.sample12.mkv': False, 'Show.Name.S01E01.HDTV.sampleA.mkv': True, 'RARBG.mp4': False, 'rarbg.MP4': False, '/TV/Sample.Show.Name.S01E01.HDTV-RARBG/RARBG.mp4': False}
    edge_cases = {None: False, '': False, 0: False, 1: False, 42: False, 123189274981274: False, 12.23: False, ('this', 'is', 'a    tuple'): False}
    for cur_test in (extension_tests, sample_tests, edge_cases):
        for (cur_name, expected_result) in six.iteritems(cur_test):
            self.assertEqual(helpers.is_media_file(cur_name), expected_result, cur_name)
