cancel
Showing results for 
Search instead for 
Did you mean: 

Length of IMDB rating assertion 02_movie_list__test

spitfyre24
Node

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

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

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.