Ejemplo n.º 1
0
def setup_common():
    print "Creating DB"
    db.create_all()
    print "Adding hardcoded tests"
    dqimporttests.hardcodedTests()
    print "Importing indicators"
    dqindicators.importIndicatorsFromFile(default_indicator_group_name, default_indicator_filename)
    print "Importing indicator descriptions"
    dqindicators.importIndicatorDescriptionsFromFile(app.config["INDICATOR_GROUP"], "tests/indicators.csv")
    print "Importing tests"
    dqimporttests.importTestsFromFile(default_tests_filename, test_level.ACTIVITY)
    print "Importing codelists"
    dqcodelists.importCodelists()
Ejemplo n.º 2
0
def setup_common():
    print "Creating DB"
    db.create_all()
    print "Adding hardcoded tests"
    dqimporttests.hardcodedTests()
    print "Importing indicators"
    dqindicators.importIndicatorsFromFile(
        default_indicator_group_name,
        default_indicator_filename)
    print "Importing indicator descriptions"
    dqindicators.importIndicatorDescriptionsFromFile(
        app.config["INDICATOR_GROUP"], 
        "tests/indicators.csv")
    print "Importing tests"
    dqimporttests.importTestsFromFile(
        default_tests_filename,
        test_level.ACTIVITY)
    print "Importing codelists"
    dqcodelists.importCodelists()
    print "Importing basic countries"
    codelist_name='countriesbasic'
    codelist_description='Basic list of countries for running tests against'
    iatidq.dqcodelists.add_manual_codelist(default_basic_countries_filename, codelist_name, codelist_description)