Exemple #1
0
    def start(self, obj):
        super(DummyUser_Feature, self).start(obj)

        with obj._context('database', sync=True):
            obj._avatars = default_actions.create_dummy_users()
            for i in xrange(1, 5):
                setattr(obj, '_avatar%d' % i, obj._avatars[i])
            setattr(obj, '_dummy', obj._avatars[0])
Exemple #2
0
    def _run(self):
        if self.options.valueOf('record'):
            dbi = DBMgr.getInstance()

            dbi.startRequest()
            conn = dbi.getDBConnection()

            default_actions.initialize_new_db(conn.root())
            default_actions.create_dummy_users()
            dbi.endRequest()

            raw_input("Press [ENTER] to finish recording... ")
            result = False

        else:
            result = self._runSeleniumCycle()

        return result
Exemple #3
0
    def _run(self):
        if self.options.valueOf('record'):
            dbi = DBMgr.getInstance()

            dbi.startRequest()
            conn = dbi.getDBConnection()

            default_actions.initialize_new_db(conn.root())
            default_actions.create_dummy_users()
            dbi.endRequest()

            raw_input("Press [ENTER] to finish recording... ")
            result = False

        else:
            result = self._runSeleniumCycle()

        return result
Exemple #4
0
    def start(self, obj):
        super(DummyUser_Feature, self).start(obj)

        use_password = isinstance(obj, SeleniumTestCase)

        with obj._context('database', sync=True):
            obj._avatars = default_actions.create_dummy_users(use_password)
            for i in xrange(1, 5):
                setattr(obj, '_avatar%d' % i, obj._avatars[i])
            setattr(obj, '_dummy', obj._avatars[0])
Exemple #5
0
    def start(self, obj):
        super(DummyUser_Feature, self).start(obj)

        use_password = isinstance(obj, SeleniumTestCase)

        with obj._context('database', sync=True):
            obj._avatars = default_actions.create_dummy_users(use_password)
            for i in xrange(1, 5):
                setattr(obj, '_avatar%d' % i, obj._avatars[i])
            setattr(obj, '_dummy', obj._avatars[0])