test: make TestBase inherit unittest.TestCase

We want to extend our base-class to support extensions to
unittest.TestCase, so make sure we inherit from it.

Adjust all callers to no longer inherit from TestCase, since this is now
done automatically by TestBase.
This commit is contained in:
David Rheinsberg 2020-05-26 17:35:37 +02:00
parent 06119f7d88
commit 240905d4a0
5 changed files with 6 additions and 5 deletions

View file

@ -10,7 +10,7 @@ from osbuild.util import osrelease
from .. import test
class TestUtilOSRelease(test.TestBase, unittest.TestCase):
class TestUtilOSRelease(test.TestBase):
def test_non_existant(self):
#
# Verify default os-release value, if no files are given.

View file

@ -10,7 +10,7 @@ from .. import test
@unittest.skipUnless(test.TestBase.have_test_checkout(), "no test-checkout access")
class TestPylint(test.TestBase, unittest.TestCase):
class TestPylint(test.TestBase):
def test_pylint(self):
#
# Run `pylint` on all python sources. We simply use `find` to locate

View file

@ -9,12 +9,13 @@ import os
import subprocess
import sys
import tempfile
import unittest
import osbuild
from osbuild.util import linux
class TestBase():
class TestBase(unittest.TestCase):
"""Base Class for Tests
This class serves as base for our test infrastructure and provides access

View file

@ -11,7 +11,7 @@ import unittest
from . import test
class TestAssemblers(unittest.TestCase, test.TestBase):
class TestAssemblers(test.TestBase):
@classmethod
def setUpClass(cls):
super().setUpClass()

View file

@ -8,7 +8,7 @@ import unittest
from . import test
class TestDescriptions(unittest.TestCase, test.TestBase):
class TestDescriptions(test.TestBase):
def assertTreeDiffsEqual(self, tree_diff1, tree_diff2):
"""