diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-06-10 14:22:17 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-06-10 14:22:17 -0700 |
commit | a8de234ec60c76b7b788513e8111be04ad9205fb (patch) | |
tree | 28f16138e108fab6b66a748d9ef697d732c4107a /tests/unittests/test_rh_subscription.py | |
parent | a3720feb537cb5189bccf4889b601704a4cdf1da (diff) | |
parent | 6ada153ebfd9483d76f904dafaa1fc80f61c9205 (diff) | |
download | vyos-cloud-init-a8de234ec60c76b7b788513e8111be04ad9205fb.tar.gz vyos-cloud-init-a8de234ec60c76b7b788513e8111be04ad9205fb.zip |
Refactor a large part of the networking code.
Splits off distro specific code into specific files so that
other kinds of networking configuration can be written by the
various distro(s) that cloud-init supports.
It also isolates some of the cloudinit.net code so that it can
be more easily used on its own (and incorporated into other
projects such as curtin).
During this process it adds tests so that the net process can
be tested (to some level) so that the format conversion processes
can be tested going forward.
Diffstat (limited to 'tests/unittests/test_rh_subscription.py')
-rw-r--r-- | tests/unittests/test_rh_subscription.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/unittests/test_rh_subscription.py b/tests/unittests/test_rh_subscription.py index b84c807b..891dbe77 100644 --- a/tests/unittests/test_rh_subscription.py +++ b/tests/unittests/test_rh_subscription.py @@ -1,12 +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.config import cc_rh_subscription from cloudinit import util -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" @@ -93,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") |