Pytest -m connection error (srvResolver)

I followed all the instruction procedure and created the .ini file as this,

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

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

but when i’m running pytest -m connection it gives me an error as follows,

How do I resolve the errors?

versions;

dnspython==2.0.0
pymongo==3.7.2

Hello! @Sandeepa_Kariyawasam .
You should try to install pymongo with srv and then re-run your tests to see if that helps.

e.g:
pip install pymongo[srv]==3.12.0

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