'Shared logic for _check_login_page() and _check_register_page()'

def _check_login_or_register_page(self, url, url_to_return):

    response = self.client.get(url)
    self.assertEqual(response.status_code, 200)
    self.assertIn(self.PROVIDER_NAME, response.content)
    context_data = response.context['data']['third_party_auth']
    provider_urls = {provider['id']: provider[url_to_return] for provider in context_data['providers']}
    self.assertIn(self.PROVIDER_ID, provider_urls)
    return provider_urls[self.PROVIDER_ID]
