Example #1
0
 def setUp(self):
     """
     Create the ElasticData Object and make it available to tests.
     """
     self.old_conf = os.environ.get('ARCHELOND_CONF')
     os.environ['ARCHELOND_CONF'] = os.path.join(
         os.path.dirname(os.path.abspath(__file__)),
         'config', 'elastic.py'
     )
     self.config = wsgi_app().config
     self.data = archelond.data.ElasticData(self.config)
     self.app = wsgi_app()
     # Set well known secret for known token generation
     self.app.config['FLASK_SECRET'] = 'wellknown'
Example #2
0
 def setUp(self):
     """
     Build internal data model with app context
     """
     self.old_conf = os.environ.get('ARCHELOND_CONF')
     os.environ['ARCHELOND_CONF'] = os.path.join(
         os.path.dirname(os.path.abspath(__file__)),
         'config', 'basic.py'
     )
     self.config = wsgi_app().config
     self.data = archelond.data.MemoryData(self.config)