Beispiel #1
0
def rateGroupRating(message):
	try:
		Group.insertGroupRating(session['email'], session['group'], int(message['msg']), conn)
	except:
		pass
Beispiel #2
0
def test_insertGroupRating():
	Group.insertGroupRating(email1, group1, rating1, conn)
	assert Group.getRatings(group1, conn) == [{'rating': 4}]
	Group.insertGroupRating(email2, group2, rating2, conn)
	assert Group.getRatings(group2, conn) == [{'rating': 5}]
	assert Group.getRatings(group3, conn) == ()