Throw if user_db is not provided.
@@ -113,6 +113,9 @@ class APIControllerWithRBACTestCase(FunctionalTest, CleanDbTestCase):
"""
Select a user which is to be used by the HTTP request following this call.
"""
+ if not user_db:
+ raise ValueError('"user_db" is mandatory')
+
mock_context = {
'user': user_db
}
