Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
#!/usr/bin/python3
import logging
-import os
import pakfire
-import unittest
-class JailTests(unittest.TestCase):
+import tests
+
+class JailTests(tests.TestCase):
"""
This tests the execute command
"""
def setUp(self):
- path = os.environ.get("TEST_STUB_ROOT")
- if not path:
- raise RuntimeError("TEST_STUB_ROOT is not defined")
-
- self.pakfire = pakfire.Pakfire(path)
+ self.pakfire = self.setup_pakfire()
def test_execute(self):
r = self.pakfire.execute(["/command", "exit-with-code", "0"])
if __name__ == "__main__":
- unittest.main()
+ tests.main()
#!/usr/bin/python3
import os
-import pakfire
-import unittest
-class Test(unittest.TestCase):
+import tests
+
+class PackageTest(tests.TestCase):
"""
This tests the Package class
"""
def setUp(self):
- path = os.environ.get("TEST_STUB_ROOT")
- if not path:
- raise RuntimeError("TEST_STUB_ROOT is not defined")
-
- self.pakfire = pakfire.Pakfire(path)
+ self.pakfire = self.setup_pakfire()
def test_open(self):
path = os.path.join(
if __name__ == "__main__":
- unittest.main()
+ tests.main()