Example #1
0
    def test_perceval_params(self):
        """Test the extraction of perceval params from an URL"""

        url = "news.mozilla.org mozilla.dev.project-link"
        expected_params = ['news.mozilla.org', 'mozilla.dev.project-link']
        self.assertListEqual(NNTPOcean.get_perceval_params_from_url(url),
                             expected_params)
Example #2
0
    def test_arthur_params(self):
        """Test the extraction of arthur params from an URL"""

        with open("data/projects-release.json") as projects_filename:
            url = json.load(projects_filename)['grimoire']['nntp'][0]
            arthur_params = {'group': 'mozilla.dev.project-link', 'host': 'news.mozilla.org'}
            self.assertDictEqual(arthur_params, NNTPOcean.get_arthur_params_from_url(url))
Example #3
0
    def test_arthur_params(self):
        """Test the extraction of arthur params from an URL"""

        url = "news.mozilla.org mozilla.dev.project-link"
        expected_params = {
            'group': 'mozilla.dev.project-link',
            'host': 'news.mozilla.org'
        }
        self.assertDictEqual(NNTPOcean.get_arthur_params_from_url(url),
                             expected_params)