I have been getting a name error, like other folks here. The output of pytest is
=================================== FAILURES =================================== _________________________ test_basic_country_search_db _________________________ client = <FlaskClient <Flask 'mflix.factory'>> @pytest.mark.projection def test_basic_country_search_db(client): countries = ['Kosovo'] result = get_movies_by_country(countries) > assert len(result) == 2 E TypeError: object of type 'NameError' has no len() tests/test_projection.py:15: TypeError ______________________ test_basic_country_search_shape_db ______________________ client = <FlaskClient <Flask 'mflix.factory'>> @pytest.mark.projection def test_basic_country_search_shape_db(client): countries = ['Russia', 'Japan'] result = get_movies_by_country(countries) > assert len(result) == 2421 E TypeError: object of type 'NameError' has no len() tests/test_projection.py:22: TypeError
This doesn’t seem to be an error based on the function that I edited in db.py, rather an error in the test itself. I have run the function in Jupyter notebook, and I am getting the values that I want. I am able to call len() on the result with no issues.
If possible, I would like to wrap up at least this problem. I don;t think I will be able to get to the final problem for section 1 of this course today.