st2api/tests/base.py
def use_user(self, user_db):
        """
        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
        }
        self.request_context_mock = mock.PropertyMock(return_value=mock_context)
        Router.mock_context = self.request_context_mock

        Select a user which is to be used by the HTTP request following this call.
        
Select a user which is to be used by the HTTP request following this call.
Select a user which is to be used by the HTTP request following this call .
def use_user(self, user_db):
        if not user_db:
            raise ValueError('"user_db" is mandatory')
        mock_context = {
            'user': user_db
        }
        self.request_context_mock = mock.PropertyMock(return_value=mock_context)
        Router.mock_context = self.request_context_mock
def use_user ( self , user_db ) : if not user_db : raise ValueError ( '"user_db" is mandatory' ) mock_context = { 'user' : user_db } self . request_context_mock = mock . PropertyMock ( return_value = mock_context ) Router . mock_context = self . request_context_mock
Select a user which is to be used by the HTTP request following this call.
Select a user which is to be used by the HTTP request following this call .
"""
        Select a user which is to be used by the HTTP request following this call.
        """
self
user_db