Ejemplo n.º 1
0
    def setUp(self):
        # setup gateway4labs environment
        add_sample_users()
        
        global CURRENT_PORT
        CURRENT_PORT += 1

        print "Launching process..."
        self.flask_process = subprocess.Popen([sys.executable, 'run.py', '--port', str(CURRENT_PORT), '--register-fake-rlms', '--testing'])
        print "Launched"

        # setup selenium environment
        self.driver = webdriver.Firefox()
        self.driver.implicitly_wait(30)
        self.base_url = "http://localhost:%s/" % CURRENT_PORT
        self.verificationErrors = []
        self.accept_next_alert = True

        print "Base URL: ", self.base_url
Ejemplo n.º 2
0
    def setUp(self):
        # setup gateway4labs environment
        add_sample_users()

        global CURRENT_PORT
        CURRENT_PORT += 1

        print "Launching process..."
        self.flask_process = subprocess.Popen([
            sys.executable, 'run.py', '--port',
            str(CURRENT_PORT), '--register-fake-rlms', '--testing'
        ])
        print "Launched"

        # setup selenium environment
        self.driver = webdriver.Firefox()
        self.driver.implicitly_wait(30)
        self.base_url = "http://localhost:%s/" % CURRENT_PORT
        self.verificationErrors = []
        self.accept_next_alert = True

        print "Base URL: ", self.base_url
Ejemplo n.º 3
0
 def setUp(self):
     add_sample_users(silence=True)
Ejemplo n.º 4
0
                    help="Adds sample users")

    parser.add_option("--db-user",
                    dest="db_user", default="root",
                    help="Database user")
    parser.add_option("--db-password",
                    dest="db_password", default=None,
                    help="Database password")

    (options, args) = parser.parse_args()

    if config.ENGINE == 'mysql':
        db_user     = options.db_user
        db_password = options.db_password
        if db_password is None:
            db_password = getpass.getpass( "MySQL administrator password: "******""

    if options.create_user:
        create_user(db_user, db_password)

    if options.create_db:
        create_db(db_user, db_password)

    if options.add_sample_users:
        add_sample_users()
    else:
        init_db(drop=True)

Ejemplo n.º 5
0
 def setUp(self):
     add_sample_users(silence=True)