import flexflow from flexflow.dbengines.sqlchemy import models as m, SqlalchemyDriver from sqlalchemy import exc from flexflow.domains import repos from flexflow.restapi.routes import bp1 from flexflow.restapi.wfdoc_routes import wf_doc_bp from flexflow.domains.repos import DomainRepo from flexflow.domains.entities import entities as ent from flexflow.domains.domainlogics.workflow import Workflow from flexflow.exceptions import rules_exceptions as rexc from flexflow.configs.testconf import test_data_path test_file = os.path.join(test_data_path, 'sample_inv_upload_v2.xlsx') app = flexflow.create_app( config_map_list=[testconf.yml, testconf.test_db_conf], blue_print_list=[bp1, wf_doc_bp]) class Tflask(FTestCase): def create_app(self): # app.config.from_object('app1.configs.testconfigs.TestConfig') app.config['TESTING'] = True app.config['LIVESERVER_PORT'] = 0 return app # def test_routes(self): # pass # m.dbdriver.delete(m.Wfdoc) # m.dbdriver.delete(m.Wfaction) # m.dbdriver.delete(m.Wfstatus)
from flexflow.dbengines.sqlchemy import models as m from flexflow.domains.repos import DomainRepo from flexflow.domains.entities import entities as ent import flexflow from flexflow.restapi.routes import bp1 l1 = [ 'file extention check passed', 'check_no_empty_cell_within_data_area=passed', 'check_within_max_row=passed', 'check_cloumn_heading=passed', 'check_no_duplicate_invoice_no=passed', 'check_tsp_name=passed' ] app = flexflow.create_app(config_map_list=[yml, test_db_conf], blue_print_list=[ bp1, ]) class TestUpload(FTestCase): def create_app(self): # app.config.from_object('app1.configs.testconfigs.TestConfig') app.config['TESTING'] = True app.config['LIVESERVER_PORT'] = 0 return app def test_configs(self): # print(yml) pass def test_xlfile_path(self):
from flexflow.restapi.wfdoc_routes import wf_doc_bp c = flexflow_configs.yml token_settings = c.get('token') print(token_settings) conf_obj = {"conf": flexflow_configs} config_list = [conf_obj, c, prod_db_conf, token_settings] #DOn't import bp1 blueprint it before all conf and other objects are initialized # from linkInventory.restapi.routes import bp1 bp_list = [bp1, wf_doc_bp] app = flexflow.create_app(blue_print_list=bp_list, config_map_list=config_list) host = c.get('host_name') port = c.get('host_port') ssl = c.get('ssl') ssl_settings = c.get('ssl_settings') def main(): if ssl == 'enabled': app.run( ssl_context=ssl_settings, host=host, port=port, ) else: