Exemplo n.º 1
0
def run_check():
    models.init_model()
    a_session = models.Session()
    email_alert = monitor.EmailAlert(a_session)
    tweet_all_alert = monitor.GeneralTweetAlert()
    tweet_at_alert = monitor.TwitterAlert(a_session)

    #Run app
    monitor.UriMonitor(a_session, [email_alert, tweet_all_alert, 
                                                 tweet_at_alert]).run_all()
    a_session.flush()
    #teardown
    models.Session.remove()
 def setUp(self):
     daemonAlertMe.config.SQL_CONNECTION = u'sqlite:///::memory::'
     init_model()
     self.cur_session = daemonAlertMe.models.Session()
     self.setup_for_test()
Exemplo n.º 3
0
def create_app():
    init_model()
    return app