def setUp(self):
     #overwrite the db name, dont interfere with stage db data
     self.postgresql = testing.postgresql.Postgresql()
     kinappserver.app.config['SQLALCHEMY_DATABASE_URI'] = self.postgresql.url()
     kinappserver.app.testing = True
     self.app = kinappserver.app.test_client()
     db.drop_all()
     db.create_all()
 def setUp(self):
     #overwrite the db name, dont interfere with stage db data
     self.postgresql = testing.postgresql.Postgresql()
     kinappserver.app.config[
         'SQLALCHEMY_DATABASE_URI'] = self.postgresql.url()
     kinappserver.app.testing = True
     #kinappserver.app.redis = redis.StrictRedis(host='0.0.0.0', port=6379, db=0) # doesnt play well with redis-lock
     self.app = kinappserver.app.test_client()
     db.drop_all()
     db.create_all()
Beispiel #3
0
 def test_flow(self):
     '''
     '''
     print('starting the test flow...')
     print(config)
     if not config.DEBUG:
         print('refusing to run this code on PROD.')
         return False
     db.drop_all()
     db.create_all()
     r = redis.StrictRedis(host='0.0.0.0', port=6379, db=0)
     r.set('foo', 'bar')