cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Length of IMDB rating assertion 02_movie_list__test

spitfyre24
Node Link

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

spitfyre24
Node Link

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

spitfyre24
Node Link

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 - November 16 - 17, 2022.


Free NODES Training Series


October 19th -

Intro to Neo4j


October 20th -

Healthcare Analytics Using Neo4j


October 25th -

Handling Neo4j data with Apache Hop


October 26th -

Blazing Fast Graphs: Hands-on with Apache Arrow and Neo4j


November 2nd -

Graph EDA Using the Neo4j GDS Client