'Test is sync file'

def test_is_sync_file(self):

    sickbeard.SYNC_FILES = u'!sync,lftp-pget-status'
    test_cases = {None: False, 42: False, u'': False, u'filename': False, u'.syncthingfilename': True, u'.syncthing.filename': True, u'.syncthing-filename': True, u'.!sync': True, u'file.!sync': True, u'file.!sync.ext': False, u'.lftp-pget-status': True, u'file.lftp-pget-status': True, u'file.lftp-pget-status.ext': False, u'.part': False, u'file.part': False, u'file.part.ext': False}
    unicode_test_cases = {u'': False, u'filename': False, u'.syncthingfilename': True, u'.syncthing.filename': True, u'.syncthing-filename': True, u'.!sync': True, u'file.!sync': True, u'file.!sync.ext': False, u'.lftp-pget-status': True, u'file.lftp-pget-status': True, u'file.lftp-pget-status.ext': False, u'.part': False, u'file.part': False, u'file.part.ext': False}
    for tests in (test_cases, unicode_test_cases):
        for (filename, result) in six.iteritems(tests):
            self.assertEqual(is_sync_file(filename), result)
