'Helper for the next methods.'

def _upload_photo(self, user, file_path):

    data = {'full_name': user.userprofile.full_name, 'email': user.email, 'username': user.username, 'lat': 40.005814, 'lng': (-3.42071), 'photo': open(file_path, 'rb'), 'externalaccount_set-MAX_NUM_FORMS': '1000', 'externalaccount_set-INITIAL_FORMS': '0', 'externalaccount_set-TOTAL_FORMS': '0', 'language_set-MAX_NUM_FORMS': '1000', 'language_set-INITIAL_FORMS': '0', 'language_set-TOTAL_FORMS': '0', 'basic_section': ''}
    data.update(_get_privacy_fields(MOZILLIANS))
    url = reverse('phonebook:profile_edit', prefix='/en-US/')
    with self.login(user) as client:
        response = client.post(url, data=data, follow=True)
    eq_(response.status_code, 200)
