Ejemplo n.º 1
0
 def setup_method(self):
     from src.AuthenticationManager import DummyAuthenticationManager
     self.system = bootstrap_system(DummyAuthenticationManager())
Ejemplo n.º 2
0
from src.BookingSystem import BookingSystem
from src.RatingManager import RatingManager

from src.ReferralSystem import ReferralSystem

app = Flask(__name__)
app.secret_key = "super extra secret"

# Authentication manager and System setup
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = "login"
booking_system = BookingSystem()

referral_system = ReferralSystem()
auth_manager = AuthenticationManager(login_manager)
hc_manager = HealthCentreManager()
user_manager = UserManager()
rating_manager = RatingManager(app.root_path)
system = bootstrap_system(auth_manager, app.root_path, hc_manager,
                          user_manager, booking_system, rating_manager,
                          referral_system)


@login_manager.user_loader
def load_user(user_id):
    return system.get_user_by_id(user_id)


import routes
Ejemplo n.º 3
0
from flask import Flask
from flask_login import LoginManager
from src.AuthenticationManager import AuthenticationManager
from src.UserManager_UPDATED import UserManager
from src.CentreManager import CentreManager
from src.HealthCareSystem import HealthCareSystem
from src.client import bootstrap_system
from src.BookingManager import bookingManager

app = Flask(__name__)
app.secret_key = 'very-secret-123'

login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'

auth_manager = AuthenticationManager(login_manager)
user_manager = UserManager.load_data()
booking_manager = bookingManager.load_data()
centre_manager = CentreManager.load_data()

if len(user_manager._patients) == 0:
    system = bootstrap_system(user_manager, centre_manager, booking_manager, auth_manager)
else:
    system = HealthCareSystem(user_manager , centre_manager , booking_manager , auth_manager)

@login_manager.user_loader
def load_user(user_id):
    return system.get_user_by_id(user_id)
Ejemplo n.º 4
0
from flask import Flask
from flask_login import LoginManager
from src.AuthenticationManager import AuthenticationManager
from src.client import bootstrap_system

app = Flask(__name__)
app.secret_key = 'very-secret-123'  # Used to add entropy

# Authentication manager and System setup
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'

auth_manager = AuthenticationManager(login_manager)
system = bootstrap_system(auth_manager)
Ejemplo n.º 5
0
from flask import Flask
from flask_login import LoginManager
from src.client import bootstrap_system

app = Flask(__name__)
app.config.from_pyfile('flask_test.cfg')
app.secret_key = 'very-secret-123'  # Used to add entropy
system = bootstrap_system()

# Login manager stuff
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'login'


@login_manager.user_loader
def load_user(user_id):
    return system.get_user_by_id(user_id)


# Loads data
# warehouse, dm, user_db = OnlineShoppingData.load_data()
Ejemplo n.º 6
0
 def setUp(self):
     self.system = bootstrap_system(DummyAuthenticationManager())