summaryrefslogtreecommitdiff
path: root/tests/unittests/test_rh_subscription.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-05-11 14:18:02 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-05-11 14:18:02 -0700
commit26ea813d293467921ab6b1e32abd2ab8fcefa3bd (patch)
treebd641e5867bdd96effa33d62e5c200b5dd7e6331 /tests/unittests/test_rh_subscription.py
parent67e506a50dae2b0c1a806f482670b864e84809ae (diff)
downloadvyos-cloud-init-26ea813d293467921ab6b1e32abd2ab8fcefa3bd.tar.gz
vyos-cloud-init-26ea813d293467921ab6b1e32abd2ab8fcefa3bd.zip
Fix py26 for rhel (and older versions of python)
Diffstat (limited to 'tests/unittests/test_rh_subscription.py')
-rw-r--r--tests/unittests/test_rh_subscription.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/unittests/test_rh_subscription.py b/tests/unittests/test_rh_subscription.py
index 8c586ad7..13045aaf 100644
--- a/tests/unittests/test_rh_subscription.py
+++ b/tests/unittests/test_rh_subscription.py
@@ -1,11 +1,24 @@
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3, as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import logging
+
from cloudinit import util
from cloudinit.config import cc_rh_subscription
-import logging
-import mock
-import unittest
+
+from .helpers import TestCase, mock
-class GoodTests(unittest.TestCase):
+class GoodTests(TestCase):
def setUp(self):
super(GoodTests, self).setUp()
self.name = "cc_rh_subscription"
@@ -92,7 +105,7 @@ class GoodTests(unittest.TestCase):
self.assertEqual(self.SM._sub_man_cli.call_count, 9)
-class TestBadInput(unittest.TestCase):
+class TestBadInput(TestCase):
name = "cc_rh_subscription"
cloud_init = None
log = logging.getLogger("bad_tests")