Esempio n. 1
0
def createdb():
    """Creates the database"""
    print >> sys.stderr, "Creating database...",

    from pdfserver import models, faketask, database
    database.init_db()

    print >> sys.stderr, "done"
Esempio n. 2
0
def createdb():
    """Creates the database"""
    print >>sys.stderr, "Creating database...",

    from pdfserver import models, faketask, database
    database.init_db()

    print >>sys.stderr, "done"
Esempio n. 3
0
    def setUp(self):
        pdfserver.app.config['BROKER_TIMEOUT'] = 20
        # Own test settings if nothing else applied
        env = 'PDFSERVER_SETTINGS'
        if env not in os.environ or not os.environ[env].strip():
            pdfserver.app.config['DATABASE'] = 'sqlite://'
            pdfserver.app.config['SECRET_KEY'] = 'test key'
            pdfserver.app.config['UPLOAD_TO'] = '/tmp'
            #pdfserver.app.config['DEBUG'] = True

        self.app = pdfserver.app.test_client()
        from pdfserver import models, faketask, database
        database.init_db()
Esempio n. 4
0
    def setUp(self):
        pdfserver.app.config['BROKER_TIMEOUT'] = 20
        # Own test settings if nothing else applied
        env = 'PDFSERVER_SETTINGS'
        if env not in os.environ or not os.environ[env].strip():
            pdfserver.app.config['DATABASE'] = 'sqlite://'
            pdfserver.app.config['SECRET_KEY'] = 'test key'
            pdfserver.app.config['UPLOAD_TO'] = '/tmp'
            #pdfserver.app.config['DEBUG'] = True

        self.app = pdfserver.app.test_client()
        from pdfserver import models, faketask, database
        database.init_db()