when i run pytest -m connection, i am having this error kindly help
as well as python run.py
Looks like your .ini or .env is not formatted correctly. Please share the content.
My .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-oeyyu.mongodb.net/test [TEST]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI =
mongodb+srv://m220student:m220password@mflix-oeyyu.mongodb.net/test
Error 1: [TEST] is like [PROD] it starts a section. So it must be on a new line, not at the end of the first URI
Error 2: You seem to have extra lines for the second uri.
Thanks a lot man, let me edit will get back soon.
@steevej-1495 Thanks those many errors are gone.
This is what it is giving now!, will really appreciate your time and assistant. only have few hours to my dead line.
Share the edited file as it looks like it is still a problem. Please enclose in the html element pre.
Edited text .ini
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-oeyyu.mongodb.net/test
[TEST]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix-oeyyu.mongodb.net/testPreformatted text
Could you please enclose the file content in the html element pre. The formatting is all screwed up.
I also see missing database name:
MFLIX_NS = sample_mflix
in both [PROD] and [TEST] sections!