summaryrefslogtreecommitdiffstats
path: root/src/tests/t_otp.py
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-07-11 19:44:11 -0400
committerGreg Hudson <ghudson@mit.edu>2013-07-11 19:44:11 -0400
commitf6cb089daed2615d0b1594d7ccc20d617eb374eb (patch)
treeadd7830f7742c9541f89dfb3115e6073686d1eef /src/tests/t_otp.py
parent4b5dd8bcfb10af254fb9efbe4cf39befe5b1e6ac (diff)
downloadkrb5-f6cb089daed2615d0b1594d7ccc20d617eb374eb.tar.gz
krb5-f6cb089daed2615d0b1594d7ccc20d617eb374eb.tar.xz
krb5-f6cb089daed2615d0b1594d7ccc20d617eb374eb.zip
Fix skip logic in t_otp.py
Reorder (and trim) the imports in t_otp.py so that k5test is pulled in before we try to import pyrad and multiprocessing. Otherwise success() isn't defined in the case where we decide to skip the entire test script.
Diffstat (limited to 'src/tests/t_otp.py')
-rw-r--r--src/tests/t_otp.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/tests/t_otp.py b/src/tests/t_otp.py
index 66a03ee573..0aeb692e46 100644
--- a/src/tests/t_otp.py
+++ b/src/tests/t_otp.py
@@ -30,14 +30,10 @@
# test how OTP handles the case of short daemon restarts.
#
+from k5test import *
from Queue import Empty
import StringIO
import struct
-import subprocess
-import sys
-import socket
-import os
-import atexit
try:
from pyrad import packet, dictionary
@@ -46,8 +42,6 @@ except ImportError:
success('Warning: skipping OTP tests due to missing pyrad or old Python')
exit(0)
-from k5test import *
-
class RadiusDaemon(Process):
MAX_PACKET_SIZE = 4096