summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/config/SSSDConfigTest.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py
index c5bc8bc7..f4d4d541 100755
--- a/src/config/SSSDConfigTest.py
+++ b/src/config/SSSDConfigTest.py
@@ -8,8 +8,17 @@ import unittest
import os
from stat import *
+import sys
+
+srcdir = os.getenv('srcdir')
+if srcdir:
+ sys.path.append("./src/config")
+ srcdir = srcdir + "/src/config"
+else:
+ srcdir = "."
import SSSDConfig
+
class SSSDConfigTestValid(unittest.TestCase):
def setUp(self):
pass
@@ -1780,14 +1789,6 @@ class SSSDConfigTestSSSDConfig(unittest.TestCase):
if __name__ == "__main__":
error = 0
- import os
- import sys
- srcdir = os.getenv('srcdir')
- if srcdir:
- srcdir = srcdir + "/src/config"
- else:
- srcdir = "."
-
suite = unittest.TestLoader().loadTestsFromTestCase(SSSDConfigTestSSSDService)
res = unittest.TextTestRunner().run(suite)
if not res.wasSuccessful():