@mock.patch('airflow.www.security.AirflowSecurityManager._has_view_access')
def test_has_access(self, mock_has_view_access):
    user = mock.MagicMock()
    user.is_anonymous = False
    mock_has_view_access.return_value = True
    self.assertTrue(self.security_manager.has_access('perm', 'view', user))
@mock.patch('airflow.www.security.AirflowSecurityManager._has_view_access')
def test_has_access(self, mock_has_view_access):
    user = mock.MagicMock()
    user.is_anonymous = False
    mock_has_view_access.return_value = True
    self.assertTrue(self.security_manager.has_access('perm', 'view', user))