cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Length of IMDB rating assertion 02_movie_list__test

I've been going through the tutorial Building Neo4j applications with python and in 02_movie_list__test, I keep getting an assertion error for the imdbRating. The code from the test is here. The part where it queries the "title" has no issues, but when it queries from "imdbRating" it seems that it doesn't find any results so the assertion below will fail. 

ordered_by_title = dao.all("title", "ASC", 1, 0)

first = dao.all("imdbRating", "DESC", 1, 0)
second = dao.all("imdbRating", "DESC", 1, 1)
ascending = dao.all("imdbRating", "ASC", 1, 0)
print(first)
print(second)
print(ascending)
assert len(first) is 1

 

1 ACCEPTED SOLUTION

The issue was with the database it was connecting to, there was another db for movies which was more limited, and this one didn't have imdbRatings, so it couldn't find the values. But when I reconnected to the sandbox one, it worked fine, so issue has been fixed.

View solution in original post

1 REPLY 1

The issue was with the database it was connecting to, there was another db for movies which was more limited, and this one didn't have imdbRatings, so it couldn't find the values. But when I reconnected to the sandbox one, it worked fine, so issue has been fixed.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online