@mock.patch('airflow.www.security.AirflowSecurityManager._has_perm')
@mock.patch('airflow.www.security.AirflowSecurityManager._has_role')
def test_has_all_dag_access(self, mock_has_role, mock_has_perm):
    mock_has_role.return_value = True
    self.assertTrue(self.security_manager.has_all_dags_access())
    mock_has_role.return_value = False
    mock_has_perm.return_value = False
    self.assertFalse(self.security_manager.has_all_dags_access())
    mock_has_perm.return_value = True
    self.assertTrue(self.security_manager.has_all_dags_access())
@mock.patch('airflow.www.security.AirflowSecurityManager._has_perm')
@mock.patch('airflow.www.security.AirflowSecurityManager._has_role')
def test_has_all_dag_access(self, mock_has_role, mock_has_perm):
    mock_has_role.return_value = True
    self.assertTrue(self.security_manager.has_all_dags_access())
    mock_has_role.return_value = False
    mock_has_perm.return_value = False
    self.assertFalse(self.security_manager.has_all_dags_access())
    mock_has_perm.return_value = True
    self.assertTrue(self.security_manager.has_all_dags_access())