def test_get_registry_key(self):
        args = Args()
        generated_key = get_registry_key(args)
        os_name, os_version, os_id = platform.dist()

        expected_key = 'localhost_system_n_' + os_name + os_version

        self.assertEqual(expected_key, generated_key)

        args.host_ip = '192.168.2.1'
        args.python = 'anaconda'
        args.venv_name = 'test'
        generated_key = get_registry_key(args)
        os_name, os_version, os_id = platform.dist()

        expected_key = 'remote_anaconda_y_' + os_name + os_version

        self.assertEqual(expected_key, generated_key)
    def setUp(self):
        self.args_1 = Args()
        self.args_2 = Args()

        self.args_2.host_ip = '192.168.2.1'
        self.args_2.python = 'anaconda'
        self.args_2.venv_name = 'test'

        self.os_name, self.os_version, self.os_id = platform.dist()

        self.key_1 = get_registry_key(self.args_1)
        self.key_2 = get_registry_key(self.args_2)

        self.handler_a = A()
        self.handler_b = B()
        self.handler_c = C()

        self.installer = Installer()
    def setUp(self):
        self.args_1 = Args()

        self.os_name, self.os_version, self.os_id = platform.dist()

        self.key_1 = get_registry_key(self.args_1)

        self.handler_a = A()
        self.handler_d = D()

        self.installer = Installer()

        self.installer.register('localhost', 'n', 'system', self.os_name,
                                [self.os_version],
                                [(self.handler_d, 'python'),
                                 (self.handler_a, 'virtualenv')])