Ejemplo n.º 1
0
    def test_package_show(self):
        """Test scenario:

            1) import package
            2) check that package values exist in
            return by package-show object
        """

        package = self.import_package(
            self.app_name,
            self.dummy_app_path
        )
        package_show = self.listing('package-show', params=package['ID'])
        package_show = {item['Property']: item['Value']
                        for item in package_show}

        self.assertEqual(
            str2bool(package['Active']),
            str2bool(package_show['enabled']))
        self.assertEqual(
            package['FQN'],
            package_show['fully_qualified_name'])
        self.assertEqual(
            package['ID'],
            package_show['id'])
        self.assertEqual(
            str2bool(package['Is Public']),
            str2bool(package_show['is_public']))
        self.assertEqual(
            package['Name'],
            package_show['name'])
        self.assertEqual(
            package['Type'],
            package_show['type'])
Ejemplo n.º 2
0
    def test_package_show(self):
        """Test scenario:

            1) import package
            2) check that package values exist in
            return by package-show object
        """

        package = self.import_package(
            self.app_name,
            self.dummy_app_path
        )
        package_show = self.listing('package-show', params=package['ID'])
        package_show = {item['Property']: item['Value']
                        for item in package_show}

        self.assertEqual(
            str2bool(package['Active']),
            str2bool(package_show['enabled']))
        self.assertEqual(
            package['FQN'],
            package_show['fully_qualified_name'])
        self.assertEqual(
            package['ID'],
            package_show['id'])
        self.assertEqual(
            str2bool(package['Is Public']),
            str2bool(package_show['is_public']))
        self.assertEqual(
            package['Name'],
            package_show['name'])
        self.assertEqual(
            package['Type'],
            package_show['type'])
Ejemplo n.º 3
0
    def test_package_is_public(self):
        """Test scenario:

            1) import package
            2) check that package is public
        """
        package = self.import_package(self.app_name, self.dummy_app_path,
                                      '--is-public')

        package_show = self.listing('package-show', params=package['ID'])
        package_show = {
            item['Property']: item['Value']
            for item in package_show
        }

        self.assertEqual(package['Is Public'], 'True')
        self.assertEqual(str2bool(package['Is Public']),
                         str2bool(package_show['is_public']))
    def test_package_is_public(self):
        """Test scenario:
            1) import package
            2) check that package is public
        """
        package = self.import_package(
            self.app_name,
            self.dummy_app_path,
            '--is-public')

        package_show = self.listing('package-show', params=package['ID'])
        package_show = {item['Property']: item['Value']
                        for item in package_show}

        self.assertEqual(package['Is Public'], 'True')
        self.assertEqual(
            str2bool(package['Is Public']),
            str2bool(package_show['is_public']))