<commit_before>from django.test import TestCase
from django.test.utils import override_settings

AUTHENTICATED_URLS = [
    '/activity/23andme/upload/',
    '/activity/data-selfie/upload/',
]


@override_settings(SSLIFY_DISABLE=True)
class SmokeTests(TestCase):
    """
    Simple tests for all of the activity URLs in the site.
    """

    fixtures = ['open_humans/fixtures/test-data.json']

    def test_login_redirect(self):
        for url in AUTHENTICATED_URLS:
            response = self.client.get(url)

            self.assertRedirects(
                response, '/account/login/?next={}'.format(url))

    def test_all_urls_with_login(self):
        login = self.client.login(username='beau', password='<PASSWORD>')
        self.assertEqual(login, True)

        for url in AUTHENTICATED_URLS:
            response = self.client.get(url)

            self.assertEqual(
                response.status_code, 200, msg='{} returned {}'.format(
                    url, response.status_code))<commit_msg>✅ test additional RunKeeper/AncestryDNA URLs<commit_after>from django.test import TestCase
from django.test.utils import override_settings

AUTHENTICATED_URLS = [
    '/activity/23andme/upload/',
    '/activity/ancestry-dna/upload/',
    '/activity/data-selfie/upload/',
    # '/activity/runkeeper/disconnect/',
    '/activity/runkeeper/finalize-import/',
    # '/activity/runkeeper/request-data-retrieval/',
]


@override_settings(SSLIFY_DISABLE=True)
class SmokeTests(TestCase):
    """
    Simple tests for all of the activity URLs in the site.
    """

    fixtures = ['open_humans/fixtures/test-data.json']

    def test_login_redirect(self):
        for url in AUTHENTICATED_URLS:
            response = self.client.get(url)

            self.assertRedirects(
                response,
                '/account/login/?next={}'.format(url),
                msg_prefix='{} did not redirect to login URL'.format(url))

    def test_all_urls_with_login(self):
        login = self.client.login(username='beau', password='<PASSWORD>')
        self.assertEqual(login, True)

        for url in AUTHENTICATED_URLS:
            response = self.client.get(url)

            self.assertEqual(
                response.status_code, 200, msg='{} returned {}'.format(
                    url, response.status_code))
{'fraction_non_alphanumeric': 0.12025862068965518, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 2.6608832807570977, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6050390', 'n_tokens_mistral': 716, 'n_tokens_neox': 682, 'n_words': 132}