Esempio n. 1
0
 def setUp(self):
     self.rbac_patcher = patch(
         "system_baseline.views.v1.view_helpers.ensure_has_role")
     patched_rbac = self.rbac_patcher.start()
     patched_rbac.return_value = None  # validate all RBAC requests
     self.addCleanup(self.stopPatches)
     test_connexion_app = app.create_app()
     test_flask_app = test_connexion_app.app
     self.client = test_flask_app.test_client()
 def setUp(self):
     test_connexion_app = app.create_app()
     test_flask_app = test_connexion_app.app
     self.client = test_flask_app.test_client()
     self.client.post(
         "api/system-baseline/v0/baselines",
         headers=fixtures.AUTH_HEADER,
         json=fixtures.BASELINE_THREE_LOAD,
     )
import os

from system_baseline.app import create_app

port = os.getenv("PORT", 8080)

create_app().run(host="0.0.0.0", port=port)
Esempio n. 4
0
from system_baseline.app import create_app

application = create_app()

if __name__ == "__main__":
    application.run()
 def setUp(self):
     test_connexion_app = app.create_app()
     test_flask_app = test_connexion_app.app
     self.client = test_flask_app.test_client()