Exemple #1
0
 def test_service_mapped_to_host_not_in_group(self):
     service = {'group': 'foo'}
     context = self._make_context({'group_names': ['bar']})
     self.assertFalse(filters.service_mapped_to_host(context, service))
Exemple #2
0
 def test_service_mapped_to_host_host_in_groups_yes(self):
     service = {'host_in_groups': 'yes'}
     self.assertTrue(filters.service_mapped_to_host(self.context, service))
Exemple #3
0
 def test_service_mapped_to_host_host_in_groups_no(self):
     service = {'host_in_groups': 'no'}
     self.assertFalse(filters.service_mapped_to_host(self.context, service))
 def test_service_mapped_to_host_in_group(self):
     service = {'group': 'foo'}
     context = self._make_context({'groups': ['foo', 'bar']})
     self.assertTrue(filters.service_mapped_to_host(context, service))