Failing in Projection Validation

What are the error messages you get on the console?

I see the same error and no error appears in console. Just wanted to mention that couple of unit tests were failing because count for some certain countries were not correct, therefore i had to fix the unit test.

Never ever change the unit tests. They are written to verify if your code is working. If the a unit test is falling fix your code or your data.

1 Like

Hi @Afzal_53899,

Please share the unit tests and the error from the console when you run the unit tests.

A screenshot will help us further to check what failed.

EDIT: Please check my post: Getting error while executing pytest -m projection


D:\python\pycharm\venv\Scripts\python.exe C:/Users/Santhosh/Downloads/mflix-python/mflix/
Working outside of application context.

This typically means that you attempted to use functionality that needed
to interface with the current application object in some way. To solve
this, set up an application context with app.app_context(). See the
documentation for more information.
“i am getting this instead of doc from collection” when i tried from calling get_movies_by_country function.

You don’t need to run file separately. After making changes in the file, please run the below command:

pytest -m projection


I got api connection , though i could not get the required field title, but i am working with py-charm instead of jupyter, i am not familiar with jupyter notebook, thank you.

Can you explain me where to run this command either in jupyter or cmd , i tried in both but i am getting no module recognized errors.

Hi @santhosh_27107,

After downloading the Handouts file, you will be having directory mflix-python directory, you need to run the command:

   mflix-python> pytest -m projection

You need to run the command from command line.


C:\Users\Santhosh\Downloads\mflix-python>pytest -m projection
‘pytest’ is not recognized as an internal or external command,
operable program or batch file.

You need to have python downloaded and installed on your system for running this course.


I have already completed 1 st chapter but i am working with pycharm , i want to know how to work with cmd(windows machine).

Hi @santhosh_27107,

From your command line under the directory mflix-python, run:

 mflix-python> pip install -r requirements.txt

After doing this, you can learn more about pytest here.

For learning more about how to work with command line, below links might help: