Ejemplo n.º 1
0
    def test_perceval_params(self):
        """Test the extraction of perceval params from an URL"""

        url = ""
        expected_params = []
        self.assertListEqual(CratesOcean.get_perceval_params_from_url(url),
                             expected_params)
Ejemplo n.º 2
0
    def test_arthur_params(self):
        """Test the extraction of arthur params from an URL"""

        url = ""
        expected_params = {'url': '', 'uri': ''}
        self.assertDictEqual(CratesOcean.get_arthur_params_from_url(url),
                             expected_params)
Ejemplo n.º 3
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']['crates'][0]
            arthur_params = {'uri': '', 'url': ''}
            self.assertDictEqual(arthur_params,
                                 CratesOcean.get_arthur_params_from_url(url))