예제 #1
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']['dockerhub'][0]
            arthur_params = {'owner': 'bitergia', 'repository': 'kibiter'}
            self.assertDictEqual(arthur_params, DockerHubOcean.get_arthur_params_from_url(url))
예제 #2
0
    def test_perceval_params(self):
        """Test the extraction of perceval params from an URL"""

        url = "bitergia kibiter"
        expected_params = ['bitergia', 'kibiter']
        self.assertListEqual(DockerHubOcean.get_perceval_params_from_url(url),
                             expected_params)
    def test_arthur_params(self):
        """Test the extraction of arthur params from an URL"""

        url = "bitergia kibiter"
        expected_params = {'owner': 'bitergia', 'repository': 'kibiter'}
        self.assertDictEqual(DockerHubOcean.get_arthur_params_from_url(url),
                             expected_params)