File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 4242 with :
4343 python-version : " 3.13"
4444
45- # - name: Install python-ldap OS dependencies
46- # run: |
47- # sudo apt-get update
48- # # https://github.com/python-ldap/python-ldap/blob/main/.github/workflows/ci.yml
49- # sudo apt-get install -y libldap2-dev libsasl2-dev slapd ldap-utils enchant-2 apparmor-utils
50- # # Disable AppArmor for slapd to allow slapdtest to create temp instances
51- # sudo aa-disable /usr/sbin/slapd
52-
5345 - name : Install python-ldap OS dependencies
5446 run : |
5547 sudo apt-get update
Original file line number Diff line number Diff line change 2121"""
2222
2323import logging
24+ import shutil
25+ import unittest
2426
2527from django .apps import apps
2628from django .conf import settings
9698"""
9799
98100
101+ def slapd_available ():
102+ """Check if slapd is available in the system"""
103+ return shutil .which ("slapd" ) is not None
104+
105+
106+ @unittest .skipUnless (slapd_available (), "slapd not installed" )
99107@override_settings (
100108 AUTHENTICATION_BACKENDS = ("dje.ldap_backend.DejaCodeLDAPBackend" ,),
101109 AUTH_LDAP_DATASPACE = "nexB" ,
You can’t perform that action at this time.
0 commit comments