Pytest -m connection - 4 failed, 39 deselected - Need help!

Test connection is failing. I am running below command from anaconda prompt using following command.

(base) C:\Users\rajee\Desktop\MongoDB\mflix-python>pytest -m connection

The filename should be no name only .ini

ren dotini_win .ini

I did change the dotini_win file name to jut .ini
But I am still getting 4 failure but my application ran successfully.
Thanks anyway.

Hi @rajeev_19589,

Please let me know if you still have any issues.


@Kanika I have the same question, my tickets are validating, but the test runs always fail. There were three tickets in the first week, with 4, 2 and 5 tests selected in each and all the tests failed in each of them, yet the ticket validated on the local server.

Hi @Aditya_Dobriyal_85801,

Please make sure of few things:

  • You are using Github code for the course, means you should have downloaded it from Handouts
  • Your .ini file should be good to go.
  • Then if unit tests are not passing, look at the errors in the console and check testcase file for expectations.

If you are still not able to figure out, then please let me know what is the error, which testcase is failing etc.


Hi @Kanika

I do not quite understand the first requirement on your list. I watched the lecture, downloaded the Handouts, and went through the files, and do not remember the any mention on using the Github code for the course.

Did I miss something?

Not exactly. We introduced github repository first but due to some issues, we decided to remove that.