'Tests to ensure that an enabled-but-not-visible provider is presented
for use in the UI when the "tpa_hint" parameter is specified'

def test_tpa_hint_provider_displayed_for_login(self):

    hidden_provider = self.configure_google_provider(visible=False, enabled=True)
    provider_ids = [idp.provider_id for idp in provider.Registry.displayed_for_login(tpa_hint=hidden_provider.provider_id)]
    self.assertIn(hidden_provider.provider_id, provider_ids)
    implicitly_hidden_provider = self.configure_linkedin_provider(enabled=True)
    provider_ids = [idp.provider_id for idp in provider.Registry.displayed_for_login(tpa_hint=implicitly_hidden_provider.provider_id)]
    self.assertIn(implicitly_hidden_provider.provider_id, provider_ids)
    disabled_provider = self.configure_twitter_provider(visible=True, enabled=False)
    provider_ids = [idp.provider_id for idp in provider.Registry.displayed_for_login(tpa_hint=disabled_provider.provider_id)]
    self.assertNotIn(disabled_provider.provider_id, provider_ids)
    no_log_in_provider = self.configure_lti_provider()
    provider_ids = [idp.provider_id for idp in provider.Registry.displayed_for_login(tpa_hint=no_log_in_provider.provider_id)]
    self.assertNotIn(no_log_in_provider.provider_id, provider_ids)
