def test_delete_all(): """insert two users and delete both at once """ user1 = {"name": "jean-louis"} user2 = {"name": "jean-michel"} db_access.create_user(user1) db_access.create_user(user2) users = db_access.get_all_users() assert len(users) > 0 db_access.delete_all_users() users = db_access.get_all_users() print "users after"
def remind(): try: today_matches = db_access.today_matches() all_users = db_access.get_all_users() for user in all_users: remind_user(user, today_matches) except Exception as e: print('Exception thrown (the reason needs to be investigated!')
def test_get_all_users(): """insert two users and get the list of them """ user1 = {"name": "jean-louis"} user2 = {"name": "jean-michel"} db_access.create_user(user1) db_access.create_user(user2) users = db_access.get_all_users() assert len(users) == 2
def users(): handle = session['handle'] user = db_access.get_user_by_handle(handle) follow_id = user['id'] user_list = db_access.get_all_users(follow_id) following_list = db_access.get_all_followers(follow_id) USERname = session['handle'] logged = session['log'] return render_template('admin/users.html', following=following_list, users=user_list, USERname=USERname, logged=logged)
def users(): user_list = db_access.get_all_users() return render_template('admin/users.html', users=user_list)