def test_members_discovery(self): discovered_members = discovery.LBMembersDiscovery().discover() self.assertEqual(4, len(discovered_members)) for pool in self.fake_get_members(): if pool['status'] == 'error': self.assertTrue(pool not in discovered_members) else: self.assertTrue(pool in discovered_members)
def test_members_discovery(self): discovered_members = discovery.LBMembersDiscovery(self.CONF).discover( self.manager) self.assertEqual(4, len(discovered_members)) for pool in self.fake_get_members(): if pool['status'] == 'error': self.assertNotIn(pool, discovered_members) else: self.assertIn(pool, discovered_members)