'Verify that third party auth info is rendered correctly in a DOM data attribute.'

def _assert_third_party_auth_data(self, response, current_backend, current_provider, providers, expected_ec):

    finish_auth_url = None
    if current_backend:
        finish_auth_url = (reverse('social:complete', kwargs={'backend': current_backend}) + '?')
    auth_info = {'currentProvider': current_provider, 'providers': providers, 'secondaryProviders': [], 'finishAuthUrl': finish_auth_url, 'errorMessage': None, 'registerFormSubmitButtonText': 'Create    Account'}
    if (expected_ec is not None):
        auth_info['providers'] = []
    auth_info = dump_js_escaped_json(auth_info)
    expected_data = '"third_party_auth":    {auth_info}'.format(auth_info=auth_info)
    self.assertContains(response, expected_data)
