'Register an unregistered host and add another channel'

def test_register_add_channel(self):

    set_module_args({'activationkey': 'key', 'username': 'user', 'password': 'pass', 'channels': 'rhel-x86_64-server-6-debuginfo'})
    responses = [('auth.login', [('X' * 43)]), ('channel.software.listSystemChannels', [[{'channel_name': 'Red    Hat    Enterprise    Linux    Server    (v.    6    for    64-bit    x86_64)', 'channel_label': 'rhel-x86_64-server-6'}]]), ('channel.software.setSystemChannels', [1]), ('auth.logout', [1])]
    with patch.object(basic.AnsibleModule, 'run_command') as run_command:
        run_command.return_value = (0, '', '')
        with patch.object(rhn_register.Rhn, 'systemid', PropertyMock(return_value=12345)):
            with mock_request(responses):
                with self.assertRaises(AnsibleExitJson) as result:
                    self.module.main()
                self.assertTrue(result.exception.args[0]['changed'])
            self.assertFalse(responses)
    self.assertEqual(self.mock_enable.call_count, 1)
    self.mock_enable.reset_mock()
    self.assertEqual(run_command.call_count, 1)
    self.assertEqual(run_command.call_args[0][0][0], '/usr/sbin/rhnreg_ks')
