'Testing the creation of one host, with one interface and one service on that interface'

def test_create_host_with_interface_with_service(self):

    h = self.plugin.createAndAddHost('pepito', 'linux')
    i = self.plugin.createAndAddInterface(h, '1.2.3.4')
    s = self.plugin.createAndAddServiceToInterface(h, i, 'unknown', protocol='tcp', ports=['80'])
    self._plugin_controller.last_command_information = self.cmdinfo
    self._plugin_controller.onCommandFinished()
    self._model_controller.processAllPendingActions()
    host = self._model_controller.getHost(h)
    interface = host.getInterface(i)
    self.assertTrue((len(interface.getAllServices()) == 1), 'The    interface    should    have    just    one    service')
    self.assertTrue((interface.getService(s) is not None), "The    service    should    be    the    one    we've    just    create")
