Connection test Failed with 4 passed and 39 deselected

Hi,
I ran pytest -m connection in conda mflix environment and got the result like the following:

platform linux -- Python 3.9.7, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: /home/ashrulochan/Downloads/MDBC, inifile: pytest.ini
plugins: anyio-3.5.0, flask-0.11.0
collected 43 items                                                             

tests/test_db_connection.py ....                                         [100%]

============================= 39 tests deselected ==============================
=================== 4 passed, 39 deselected in 7.15 seconds ==================

Can’t figure out what’s the error.

I have saved the .ini file like:

[PROD]
SECRET_KEY = Ashrulochan
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix.lweb2.mongodb.net/test
MFLIX_NS = sample_mflix

[TEST]
SECRET_KEY = AshrulochanTest
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix.lweb2.mongodb.net/test
MFLIX_NS = sample_mflix
`

Hey @Ashrulochan_Sahoo,

Welcome to the MongoDB Community Forums! :leaves:

Some of the test cases will always be deselected as they would be related to other lab exercises. Are there any Error messages that you are getting? I don’t see them in the terminal snippet that you have attached. If any test case is failing there would be something like this in the terminal:

================== ERRORS =================
ERROR tests/<failed test case here>

Let us know if there are any errors that you are getting in the terminal. Otherwise, the section of the terminal that you attached looks good. Feel free to reach out for anything else as well.

Regards,
Satyam

Thank you, @Satyam
Thanks for clearing the confusion. There’s no other error till now.

But, where to get the validation code? Isn’t the connection test supposed to give a connection validation code?

1 Like

Hey @Ashrulochan_Sahoo ,

There will be a link to the status page in the instructions of the lab. Do re-read the instructions and check. From there, you’ll get the validation code.

Regards,
Satyam

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.