human
Complete the below
def generator(tvdb_id, show_name, cur_data, force_search):

    ''''Generate tests
    :param tvdb_id:
    :param show_name:
    :param cur_data:
    :param force_search:
    :return:'
    '''
assistant
#Here is the Python code you requested.
    def do_test():
        '\n                                Test    to    perform\n                                '
        global search_items
        search_items = cur_data['i']
        show = TVShow(1, tvdb_id)
        show.name = show_name
        show.quality = cur_data['q']
        show.saveToDB()
        sickbeard.showList.append(show)
        episode = None
        for epNumber in cur_data['e']:
            episode = TVEpisode(show, cur_data['s'], epNumber)
            episode.status = common.WANTED
            episode.saveToDB()
        best_result = search.searchProviders(show, episode.episode, force_search)
        if (not best_result):
            assert (cur_data['b'] == best_result)
        assert (cur_data['b'] == best_result.name)
    return do_test