'Regression test to ensure that the Registry properly fetches OAuth2ProviderConfigs that have a provider_slug
which doesn\'t match any of the possible backend_names.'

def test_oauth2_provider_keyed_by_provider_slug(self):

    google_provider = self.configure_google_provider(enabled=True, provider_slug='custom_slug')
    self.assertIn(google_provider, provider.Registry._enabled_providers())
    self.assertIn(google_provider, provider.Registry.get_enabled_by_backend_name('google-oauth2'))
