<commit_before><commit_msg>Add pagerteam tests file which had been missed despite its existence<commit_after>from hc.api.models import Channel
from hc.test import BaseTestCase


class AddPagerTeamTestCase(BaseTestCase):
    url = "/integrations/add_pagerteam/"

    def test_instructions_work(self):
        self.client.login(username="<EMAIL>", password="password")
        r = self.client.get(self.url)
        self.assertContains(r, "PagerTeam")

    def test_it_works(self):
        form = {"value": "http://example.org"}

        self.client.login(username="<EMAIL>", password="password")
        r = self.client.post(self.url, form)
        self.assertRedirects(r, "/integrations/")

        c = Channel.objects.get()
        self.assertEqual(c.kind, "pagerteam")
        self.assertEqual(c.value, "http://example.org")
        self.assertEqual(c.project, self.project)

    def test_it_rejects_bad_url(self):
        form = {"value": "not an URL"}

        self.client.login(username="<EMAIL>", password="password")
        r = self.client.post(self.url, form)
        self.assertContains(r, "Enter a valid URL")

{'fraction_non_alphanumeric': 0.13839285714285715, 'fraction_numerical': 0.0, 'mean_word_length': 3.3115384615384613, 'pattern_counts': {'":': 2, '<': 6, '<?xml version=': 0, '>': 6, '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': '804299', 'n_tokens_mistral': 345, 'n_tokens_neox': 337, 'n_words': 67}