コード例 #1
0
def action_test(params):
    from nailgun.logger import logger
    from nailgun.unit_test import TestRunner

    logger.info("Running tests...")
    TestRunner.run()
    logger.info("Done")
コード例 #2
0
ファイル: manage.py プロジェクト: MsiRgb/fuel-web
def action_test(params):
    from nailgun.logger import logger
    from nailgun.unit_test import TestRunner

    logger.info("Running tests...")
    TestRunner.run()
    logger.info("Done")
コード例 #3
0
ファイル: manage.py プロジェクト: ilyinon/fuelweb
    from nailgun.settings import settings

    if params.action == "syncdb":
        logger.info("Syncing database...")
        from nailgun.db import syncdb
        syncdb()
        logger.info("Done")
    elif params.action == "dropdb":
        logger.info("Dropping database...")
        from nailgun.db import dropdb
        dropdb()
        logger.info("Done")
    elif params.action == "test":
        logger.info("Running tests...")
        from nailgun.unit_test import TestRunner
        TestRunner.run()
        logger.info("Done")
    elif params.action == "loaddata":
        logger.info("Uploading fixture...")
        from nailgun.fixtures import fixman
        with open(params.fixture, "r") as fileobj:
            fixman.upload_fixture(fileobj)
        logger.info("Done")
    elif params.action == "loaddefault":
        logger.info("Uploading fixture...")
        from nailgun.fixtures import fixman
        fixman.upload_fixtures()
        logger.info("Done")
    elif params.action == "dump_settings":
        sys.stdout.write(settings.dump())
    elif params.action in ("run",):
コード例 #4
0
    from nailgun.settings import settings

    if params.action == "syncdb":
        logger.info("Syncing database...")
        from nailgun.db import syncdb
        syncdb()
        logger.info("Done")
    elif params.action == "dropdb":
        logger.info("Dropping database...")
        from nailgun.db import dropdb
        dropdb()
        logger.info("Done")
    elif params.action == "test":
        logger.info("Running tests...")
        from nailgun.unit_test import TestRunner
        TestRunner.run()
        logger.info("Done")
    elif params.action == "loaddata":
        logger.info("Uploading fixture...")
        from nailgun.db.sqlalchemy import fixman
        with open(params.fixture, "r") as fileobj:
            fixman.upload_fixture(fileobj)
        logger.info("Done")
    elif params.action == "loaddefault":
        logger.info("Uploading fixture...")
        from nailgun.db.sqlalchemy import fixman
        fixman.upload_fixtures()
        logger.info("Done")
    elif params.action == "dump_settings":
        sys.stdout.write(settings.dump())
    elif params.action in ("run", ):