diff --git a/tests/test_ntp.py b/tests/test_ntp.py
index 6b9824739c4ada58edd6d30f747a6286407a4179..0ef81b9f96c6abb96c757036ae3002a3c1c50add 100755
--- a/tests/test_ntp.py
+++ b/tests/test_ntp.py
@@ -4,13 +4,12 @@
 import os
 import sys
 import subprocess
-import shlex
 import imp
 
 # Check that ntpd is synced
 print('Running ntpq -pd')
 ntpd_status = subprocess.getoutput('LANG=C ntpq -pd')
-if not 'remote' in ntpd_status:
+if 'remote' not in ntpd_status:
     print('NTP not working, ntpq -p output:\n%s' % ntpd_status)
     sys.exit(1)
 else: