Solved :Error : Ticket:Connection

I am having a connection error.

On the status page, I have eight red and the other eight are “Currently Validating” status.

Here are the details

(mflix) C:\mflix-python>pytest C:\mflix-python\tests\test_db_connection.py
============================= test session starts =============================
platform win32 – Python 3.7.0, pytest-3.8.0, py-1.6.0, pluggy-0.7.1
rootdir: C:\mflix-python, inifile: pytest.ini
plugins: remotedata-0.3.0, openfiles-0.3.0, doctestplus-0.1.3, arraydiff-0.2
collected 4 items

tests\test_db_connection.py EEEE [100%]

=================================== ERRORS ====================================
_____________________ ERROR at setup of test_atlas_setup ______________________
file C:\mflix-python\tests\test_db_connection.py, line 21
@pytest.mark.connection
@pytest.mark.usefixtures(‘config’)
def test_atlas_setup(client, config):
E fixture ‘config’ not found

  available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.

C:\mflix-python\tests\test_db_connection.py:21
_____________________ ERROR at setup of test_basic_movies _____________________
file C:\mflix-python\tests\test_db_connection.py, line 29
@pytest.mark.connection
def test_basic_movies(client):
E fixture ‘client’ not found

  available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.

C:\mflix-python\tests\test_db_connection.py:29
__________________ ERROR at setup of test_search_by_movie_id __________________
file C:\mflix-python\tests\test_db_connection.py, line 36
@pytest.mark.connection
def test_search_by_movie_id(client):
E fixture ‘client’ not found

  available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.

C:\mflix-python\tests\test_db_connection.py:36
__________________ ERROR at setup of test_simple_text_search __________________
file C:\mflix-python\tests\test_db_connection.py, line 42
@pytest.mark.connection
def test_simple_text_search(client):
E fixture ‘client’ not found

  available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.

C:\mflix-python\tests\test_db_connection.py:42
=========================== 4 error in 0.07 seconds ===========================

(mflix) C:\mflix-python>

.ini file

Ticket: Connection

Rename this file to .ini after filling in your MFLIX_DB_URI and your SECRET_KEY

Do not surround the URI with quotes

[PROD]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix-4q3bj.mongodb.net/test?retryWrites=true&w=majority
MFLIX_NS = sample_mflix

[TEST]
SECRET_KEY = super_secret_testing_key
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix-4q3bj.mongodb.net/test?retryWrites=true&w=majority
MFLIX_NS = sample_mflix

==================================================== connection string works====================================================================================
(mflix) C:\mflix-python>mongo mongodb+srv://m220student:m220password@mflix-4q3bj.mongodb.net/test?retryWrites=true&w=majority
MongoDB shell version v4.2.2
connecting to: mongodb://mflix-shard-00-00-4q3bj.mongodb.net:27017,mflix-shard-00-01-4q3bj.mongodb.net:27017,mflix-shard-00-02-4q3bj.mongodb.net:27017/test?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=mflix-shard-0&retryWrites=true&ssl=true
2020-02-07T21:57:36.175-0500 I NETWORK [js] Starting new replica set monitor for mflix-shard-0/mflix-shard-00-00-4q3bj.mongodb.net:27017,mflix-shard-00-01-4q3bj.mongodb.net:27017,mflix-shard-00-02-4q3bj.mongodb.net:27017
2020-02-07T21:57:36.175-0500 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to mflix-shard-00-02-4q3bj.mongodb.net:27017
2020-02-07T21:57:36.175-0500 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to mflix-shard-00-00-4q3bj.mongodb.net:27017
2020-02-07T21:57:36.175-0500 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to mflix-shard-00-01-4q3bj.mongodb.net:27017
2020-02-07T21:57:36.394-0500 I NETWORK [ReplicaSetMonitor-TaskExecutor] Confirmed replica set for mflix-shard-0 is mflix-shard-0/mflix-shard-00-00-4q3bj.mongodb.net:27017,mflix-shard-00-01-4q3bj.mongodb.net:27017,mflix-shard-00-02-4q3bj.mongodb.net:27017
Implicit session: session { “id” : UUID(“a926858f-bda4-494a-8dc7-be4dfcf1282b”) }
MongoDB server version: 4.2.3
MongoDB Enterprise mflix-shard-0:PRIMARY> db
test

MongoDB Enterprise mflix-shard-0:PRIMARY> show dbs
admin 0.000GB
local 4.165GB
sample_airbnb 0.051GB
sample_analytics 0.009GB
sample_geospatial 0.001GB
sample_mflix 0.040GB
sample_supplies 0.001GB
sample_training 0.060GB
sample_weatherdata 0.002GB
MongoDB Enterprise mflix-shard-0:PRIMARY> use sample_mflix
switched to db sample_mflix
MongoDB Enterprise mflix-shard-0:PRIMARY> show collections
comments
movies
sessions
theaters
users
MongoDB Enterprise mflix-shard-0:PRIMARY>

I was able to fix the problem by upgrading dnspython from 1.15.0 to 1.16.0