Beispiel #1
0
 def __init__(self):
     '''
     :)
     '''
     debug_msg(">>> %s.%s" % (__name__, sys._getframe().f_code.co_name))
     self.database = Initialization().get_global_db()
     self.db_helper = database_helper(self.database)
Beispiel #2
0
    def __init__(self):

        self.database = Initialization().get_global_db()
        self.helper = database_helper(self.database)
        debug_msg(">>> %s.%s" % (__name__, sys._getframe().f_code.co_name))

        self.uid = Users.query.count()
        self.nick_name = 'fake_user' + str(self.uid)
        self.password = '******' + str(self.uid)

        self.primary_id = Primary_Category.query.count()
        self.primary_name = 'fake_category' + str(self.primary_id)
        self.primary_color = '#f23456'
        self.primary_logo = './logo.png'

        self.secondary_id = Secondary_Category.query.count()
        self.secondary_name = 'fake_secondary' + str(self.secondary_id)
        self.secondary_color = "#b33321"
        self.secondary_logo = './secondary_logo.png'

        self.date_id = Date.query.count()
        self.date_date = datetime.date(2017,3,10)
        self.date_last_changed_time = datetime.datetime.now()

        self.blocks_id = Blocks.query.count()
Beispiel #3
0
 def __init__(self):
     print("\n\n\n\n\n\n\n\n\n\n\n\n!!!day_controller_tester!!!")
     self.database = Initialization().get_global_db()
     self.db_helper = database_helper.database_helper(self.database)
     self.db_helper.rebuild_database()
     self.db_tester = database_tester()
     self.db_tester.generate_fake_data()
     self.db_helper.dump_all_data()
    def __init__(self, date_string=None, id=None,  user_id=None):
        debug_msg(">>> %s.%s" % (__name__, sys._getframe().f_code.co_name))
        self.date = None
        if date_string != None:
            self.date = self.__query_date_from_string(date_string, user_id)
        if id != None:
            self.date = self.__query_date_from_id(id, user_id)

        self.database = Initialization().get_global_db()
        self.db_helper = database_helper(self.database)
Beispiel #5
0
 def __init__(self):
     print("\n\n\n\n\n\n\n\n\n\n\n\n!!!users_controller_tester!!!")
     self.database = Initialization().get_global_db()
     self.db_helper = database_helper.database_helper(self.database)
     self.db_helper.rebuild_database()
     self.db_tester = database_tester()
     self.db_tester.generate_fake_user(nick_name='tester1',
                                       password='******')
     self.db_tester.generate_fake_user(nick_name='tester2',
                                       password='******')
     self.db_helper.dump_all_data()
Beispiel #6
0
 def __init__(self):
     print("\n\n\n\n\n\n\n\n\n\n\n\n!!!users_controller_tester!!!")
     self.database = Initialization().get_global_db()
     self.db_helper = database_helper.database_helper(self.database)
     self.db_helper.rebuild_database()
     self.db_tester = database_tester()
     self.db_tester.generate_fake_data()
     new_pri = self.db_tester.generate_fake_primary_category()
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     self.db_helper.dump_all_data()
 def __init__(self):
     print("\n\n\n\n\n\n\n\n\n\n\n\n!!!statics_controller_tester!!!")
     self.database = Initialization().get_global_db()
     self.db_helper = database_helper.database_helper(self.database)
     self.db_helper.rebuild_database()
     self.db_tester = database_tester()
     self.db_tester.generate_fake_data()
     new_pri = self.db_tester.generate_fake_primary_category()
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     new_pri = self.db_tester.generate_fake_primary_category()
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     new_sec = self.db_tester.generate_fake_secondary_category(new_pri)
     blocks_con = blocks_controller('0')
     blocks_con.update_a_block(1, 2)
     blocks_con.update_a_block(2, 1)
     blocks_con.update_a_block(3, 4)
     blocks_con.update_a_block(4, 4)
     blocks_con.update_a_block(5, 6)
     blocks_con.update_a_block(6, 5)
     self.db_helper.dump_all_data()
Beispiel #8
0
from flask_migrate import Migrate, MigrateCommand

from Initialization import Initialization
from MyConfig import MyConfig
from Utilities import debug_msg

Initialization().global_create_app(__name__, None)
init_app = Initialization().get_global_app()
#debug_msg("enable CORS")
#CORS(init_app, send_wildcard=True)

init_db = Initialization().global_create_db(init_app)

from DB_Model import database_helper

db_helper = database_helper.database_helper(init_db)
db_helper.rebuild_database()

from DB_Model.database_tester import database_tester

db_tester = database_tester()

db_tester.generate_fake_data()

from Data_Controllers.blocks_controller import blocks_controller

new_pri = db_tester.generate_fake_primary_category()
new_sec = db_tester.generate_fake_secondary_category(new_pri)
new_sec = db_tester.generate_fake_secondary_category(new_pri)
new_sec = db_tester.generate_fake_secondary_category(new_pri)
new_pri = db_tester.generate_fake_primary_category()