'Testing the creation of the same host, two times.
This simulates two plugins creating the host with the same name
We should end up with just one host in the controller'

def test_create_same_host_two_times(self):

    h1 = self.plugin.createAndAddHost('pepito', 'linux')
    h2 = self.plugin.createAndAddHost('pepito', 'linux')
    self._plugin_controller.last_command_information = self.cmdinfo
    self._plugin_controller.onCommandFinished()
    self._model_controller.processAllPendingActions()
    self.assertTrue((len(self._model_controller.getAllHosts()) == 1), 'The    controller    should    have    just    one    host')
    self.assertTrue((self._model_controller.getHost(h1) == self._model_controller.getHost(h2)), 'The    host    should    be    the    same')
