Error running

I’m running the tests for the user report and I got this error and I cannot get my around what is wrong:

client = <FlaskClient <Flask ‘mflix.factory’>>

def test_check_report(client):
    result = most_active_commenters()
  assert {'_id': '', 'count': 909} in result

E AssertionError: assert {’_id’: ‘’, ‘count’: 909} in [{’_id’: ‘Mace Tyrell’, ‘count’: 909}, {’_id’: ‘Megan Richards’, ‘count’: 880}, {’_id’: ‘Bradley Brooks’, ‘count’: 880}, {’_id’: ‘Missandei’, ‘count’: 874}, {’_id’: ‘Thoros of Myr’, ‘count’: 870}, {’_id’: ‘Yara Greyjoy’, ‘count’: 868}, …]

tests/ AssertionError

My pipeline and read_concern is like this:

pipeline = [
{’$group’: {’_id’: ‘$name’,‘count’: {’$sum’: 1}}},
{’$sort’: {‘count’: -1}},
{’$limit’: 20}

# you may want to change this read concern!
comments = db.comments.with_options(read_concern=ReadConcern("majority"))
result = comments.aggregate(pipeline)
return list(result)

I appreciate any help you can give me


Nevermind, I found my error: I put in the “_id”: ‘$name’ instead of ‘$email’