summaryrefslogtreecommitdiff
path: root/tests/unittests/test_rh_subscription.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-04-06 13:57:00 -0400
committerScott Moser <smoser@ubuntu.com>2016-04-06 13:57:00 -0400
commit578fed15061293ce421eec1c9c1e2e056631a734 (patch)
tree9fbe580cabcec0d34418e4327f8794a57e76eba1 /tests/unittests/test_rh_subscription.py
parenteb5a4dda1fc221bf29c45eef47f0bfadec250943 (diff)
downloadvyos-cloud-init-578fed15061293ce421eec1c9c1e2e056631a734.tar.gz
vyos-cloud-init-578fed15061293ce421eec1c9c1e2e056631a734.zip
fix tests and hopefully actually work
Diffstat (limited to 'tests/unittests/test_rh_subscription.py')
-rw-r--r--tests/unittests/test_rh_subscription.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/unittests/test_rh_subscription.py b/tests/unittests/test_rh_subscription.py
index 38d5763a..8c586ad7 100644
--- a/tests/unittests/test_rh_subscription.py
+++ b/tests/unittests/test_rh_subscription.py
@@ -126,7 +126,8 @@ class TestBadInput(unittest.TestCase):
'enable-repo': 'not_a_list'
}}
config_badkey = {'rh_subscription':
- {'activation_key': 'abcdef1234',
+ {'activation-key': 'abcdef1234',
+ 'fookey': 'bar',
'org': '123',
}}
@@ -138,7 +139,11 @@ class TestBadInput(unittest.TestCase):
'''
Attempt to register without the password key/value
'''
- self.input_is_missing_data(self.config_no_password)
+ self.SM._sub_man_cli = mock.MagicMock(
+ side_effect=[util.ProcessExecutionError, (self.reg, 'bar')])
+ self.handle(self.name, self.config_no_password, self.cloud_init,
+ self.log, self.args)
+ self.assertEqual(self.SM._sub_man_cli.call_count, 0)
def test_no_org(self):
'''