freeradius: déplace tous les tests dans subdir
This commit is contained in:
parent
d36ceb7e3d
commit
132636e7f9
4 changed files with 14 additions and 0 deletions
31
freeradius/testing/test.py
Executable file
31
freeradius/testing/test.py
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash /usr/scripts/python.sh
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import auth
|
||||
import sys
|
||||
import time
|
||||
|
||||
delattr(sys, 'argv')
|
||||
|
||||
#if len(sys.argv) < 2 and False:
|
||||
# print "Give me a mac !"
|
||||
# sys.exit(1)
|
||||
|
||||
# Machine à s'authentifier (cerveaulent)
|
||||
#p=(('Calling-Station-Id', sys.argv[1]),)
|
||||
|
||||
auth.instantiate(())
|
||||
|
||||
# Test avec l'interface wifi d'apprentis
|
||||
p=(
|
||||
('Calling-Station-Id', '02:69:75:42:24:03'),
|
||||
('User-Name', 'apprentis-wifi'),
|
||||
)
|
||||
|
||||
print repr(auth.authorize_wifi(p))
|
||||
print "wait for 3s, tu peux aller crasher le serveur pg ou ldap"
|
||||
sys.stdout.flush()
|
||||
|
||||
time.sleep(3)
|
||||
|
||||
print repr(auth.post_auth_wifi(p))
|
Loading…
Add table
Add a link
Reference in a new issue