def setUpClass(cls): print("*"*130) print(" "*40+"Testing Aesthetic Function Model") print("*"*130) cls.db_name = 'scsr-api-test2' cls.app_factory = ScsrAPP( MONGODB_SETTINGS = {'DB': cls.db_name, 'HOST': MONGODB_HOST}, TESTING = True, WTF_CSRF_ENABLED = False, SECRET_KEY = 'mySecret!').APP cls.app = cls.app_factory.test_client() #initialize the database with the countries and languages from install_system import start_countries,start_language, start_games, start_genre, start_elements_ontology, start_elements_pigd start_countries() start_language() start_genre() start_games() start_elements_ontology() start_elements_pigd() #load the elements cls.init_indexes() cls.init_elements() cls.init_interactivity_operated_indexes() cls.init_ludic_operated_indexes() cls.init_interactivity_behavior_operand_comparators() cls.init_ludic_behavior_operand_comparators()
def setUpClass(cls): print("*" * 130) print(" " * 40 + "Testing Element Model") print("*" * 130) cls.db_name = 'scsr-api-test2' cls.app_factory = ScsrAPP(MONGODB_SETTINGS={ 'DB': cls.db_name, 'HOST': MONGODB_HOST }, TESTING=True, WTF_CSRF_ENABLED=False, SECRET_KEY='mySecret!').APP cls.app = cls.app_factory.test_client() #initialize the database with the countries and languages from install_system import start_countries, start_language, start_games, start_genre start_countries() start_language() start_genre() start_games() ''' start_elements_ontology()
def setUpClass(cls): print("*" * 130) print(" " * 40 + "Testing Behavior Model") print("*" * 130) cls.db_name = 'scsr-api-test2' cls.app_factory = ScsrAPP(MONGODB_SETTINGS={ 'DB': cls.db_name, 'HOST': MONGODB_HOST }, TESTING=True, WTF_CSRF_ENABLED=False, SECRET_KEY='mySecret!').APP cls.app = cls.app_factory.test_client() #initialize the database with the countries and languages from install_system import start_countries, start_language, start_games, start_genre, start_elements_ontology, start_elements_pigd start_countries() start_language() start_genre() start_games() start_elements_ontology() start_elements_pigd() cls.els1 = [1, 3, 5, 7, 9] cls.els2 = [2, 3, 4, 7, 8, 10, 12, 11] cls.els1_add = [6, 13, 18] cls.els1_rem1 = [3] cls.els1_rem2 = [5, 9] cls.els1_add2 = [20, 24, 32, 42] cls.int = list(set(cls.els1) & set(cls.els2)) cls.uni = list(set(cls.els1) | set(cls.els2)) cls.xor = list(set(cls.els1) ^ set(cls.els2)) cls.diff1 = list(set(cls.els1) - set(cls.els2)) cls.diff2 = list(set(cls.els2) - set(cls.els1)) cls.newels1 = list( set(set(cls.els1) | set(cls.els1_add)) - set(cls.els1_rem1)) cls.newels2 = list( set(cls.newels1) - set(cls.els1_rem2) | set(cls.els1_add2)) cls.init_elements()