Ejemplo n.º 1
0
def threshold(url_id):
	threshold_time = float(request.form['max_alert'])
	url = core.alert_threshold(url_id, threshold_time)
	return redirect(url_for('view_url', url_id=url_id))
Ejemplo n.º 2
0
def test_alert_thresh():
	'''insert a threshold and test whether it gets set in the database'''
	url_id = 6
	seconds = 3.0
	result = core.alert_threshold(url_id, seconds)
	tools.assert_equals(result.alert_threshold, 3.0)