def test_worddict(): assert type(wordlist_to_dict()) == dict assert WORDDICT['happy'] == 8
# coding=utf-8 """ Testing the functions in this final program.""" from app.YouTubeConnection import YouTubeConnection from app.sentimentAnalysis import wordlist_to_dict, sentiment, sentiment_analysis from app.Plotter import list_divider, generate_pie_plots, genereate_hist_plots from app.detect_lang import LanguageDetector from gdata.youtube import service from app import config import argparse from app import app WORDDICT = wordlist_to_dict() SEARCH_WORD = 'cocio' TOKENIZED_WORDS = ['but', 'he', 'fails', 'miserably'] EMPTY_LIST = [] COMMENTSLIST = [['Lol I actually thought that was pretty good cause at first I' ' thought it would just be legit cheesy haha']] EMPTY_LIST_LIST = [[]] NO_WORDS = [['this is test']] ID_LIST = ['12g34h5T', 'sg09G876', '5A67sD89x'] ID = '-EBSfd3YlKQ' URL = ["https://www.youtube.com/watch?v=OoOHkJYeFDg"] YTS = service.YouTubeService() POS_NEG_LIST = [3, 11, 9, 5, 6, 8] UNKNOWN_LIST = [-1, -1, -1, -1, -1] POS_NEG_LISTS = [[1, 3, 6, 7], [0, 12, 3, 8, 9]] LD = LanguageDetector() developer_key = config.DEVELOPER_KEY youtube_api_version = config.YOUTUBE_API_VERSION youtube_api_service_name = config.YOUTUBE_API_SERVICE_NAME YTC = YouTubeConnection(developer_key, youtube_api_version,