Closed scottmc42 closed 3 years ago
My guess is that the roles are not properly set up in the test database, but they are correct in your development database. The database set up for the tests is done in the setUp()
method of the test class. Check there to make sure you are adding the roles.
Ah.. You are correct. I didn't notice that you added the Role.insert_roles()
to the setup routine.
Thank you
I'm not quite sure why this is happening. When I try running the test suite, I get a failure with
test_user_role
It also fails on COMMENT, and WRITE. Here is the test code:
Yet when I go into a flask shell and try the same commands, everything returns correctly:
So why are the tests failing and saying all permissions are false, yet running the same commands manually would pass?