コード例 #1
0
    def test_environment_paths(self):
        """@Test: List the environment paths under a given organization

        @Feature: Lifecycle Environment

        @Assert: Lifecycle environment paths listed

        """
        try:
            org = make_org()
            test_env = make_lifecycle_environment({
                'organization-id': org['id'],
            })
        except CLIFactoryError as err:
            self.fail(err)

        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({
            'organization-id': org['id'],
            'permission-type': 'readable',
        })
        self.assertEqual(result.return_code, 0)
        self.assertEqual(len(result.stderr), 0)
        self.assertIn(
            u'Library >> {0}'.format(test_env['name']),
            u''.join(result.stdout)
        )
コード例 #2
0
    def test_environment_paths(self):
        """@Test: List the environment paths under a given organization

        @Feature: Lifecycle Environment

        @Assert: Lifecycle environment paths listed

        """
        try:
            org = make_org(cached=True)
            payload = {
                'organization-id': org['id'],
            }
            test_env = make_lifecycle_environment(payload)
        except CLIFactoryError as err:
            self.fail(err)

        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({'organization-id': org['id'],
                                            'permission-type': 'readable'})
        self.assertEqual(result.return_code, 0,
                         "return code must be 0, instead got {0}".
                         format(result.return_code))
        self.assertEqual(
            len(result.stderr), 0,
            "There should not be an error here.")
        self.assertIn(u'Library >> {0}'.format(test_env['name']),
                      result.stdout)
コード例 #3
0
    def test_environment_paths(self):
        """@Test: List the environment paths under a given organization

        @Feature: Lifecycle Environment

        @Assert: Lifecycle environment paths listed

        """
        try:
            org = make_org()
            test_env = make_lifecycle_environment({
                'organization-id': org['id'],
            })
        except CLIFactoryError as err:
            self.fail(err)

        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({
            'organization-id': org['id'],
            'permission-type': 'readable',
        })
        self.assertEqual(result.return_code, 0)
        self.assertEqual(len(result.stderr), 0)
        self.assertIn(u'Library >> {0}'.format(test_env['name']),
                      u''.join(result.stdout))
コード例 #4
0
    def test_positve_list_paths(self):
        """List the environment paths under a given organization

        @id: 71600d6b-1ef4-4b88-8e9b-eb2481ee1fe2

        @Assert: Lifecycle environment paths listed

        """
        org = make_org()
        lc_env = make_lifecycle_environment({"organization-id": org["id"]})
        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({"organization-id": org["id"], "permission-type": "readable"})
        self.assertIn(u"Library >> {0}".format(lc_env["name"]), u"".join(result))
コード例 #5
0
def test_positve_list_paths(module_org):
    """List the environment paths under a given organization

    :id: 71600d6b-1ef4-4b88-8e9b-eb2481ee1fe2

    :expectedresults: Lifecycle environment paths listed


    :CaseImportance: Critical
    """
    lc_env = make_lifecycle_environment({'organization-id': module_org.id})
    # Add paths to lifecycle environments
    result = LifecycleEnvironment.paths({
        'organization-id': module_org.id,
        'permission-type': 'readable'
    })
    assert f"Library >> {lc_env['name']}" in ''.join(result)
コード例 #6
0
    def test_positve_list_paths(self):
        """List the environment paths under a given organization

        :id: 71600d6b-1ef4-4b88-8e9b-eb2481ee1fe2

        :expectedresults: Lifecycle environment paths listed


        :CaseImportance: Critical
        """
        org = make_org()
        lc_env = make_lifecycle_environment({'organization-id': org['id']})
        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({
            'organization-id': org['id'],
            'permission-type': 'readable'
        })
        self.assertIn('Library >> {0}'.format(lc_env['name']), ''.join(result))
コード例 #7
0
    def test_positve_list_paths(self):
        """List the environment paths under a given organization

        @Feature: Lifecycle Environment

        @Assert: Lifecycle environment paths listed

        """
        org = make_org()
        lc_env = make_lifecycle_environment({
            'organization-id': org['id'],
        })
        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({
            'organization-id': org['id'],
            'permission-type': 'readable',
        })
        self.assertIn(u'Library >> {0}'.format(lc_env['name']),
                      u''.join(result))
コード例 #8
0
    def test_positve_list_paths(self):
        """List the environment paths under a given organization

        @Feature: Lifecycle Environment

        @Assert: Lifecycle environment paths listed

        """
        org = make_org()
        lc_env = make_lifecycle_environment({
            'organization-id': org['id'],
        })
        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({
            'organization-id': org['id'],
            'permission-type': 'readable',
        })
        self.assertIn(
            u'Library >> {0}'.format(lc_env['name']),
            u''.join(result)
        )
コード例 #9
0
    def test_positve_list_paths(self):
        """List the environment paths under a given organization

        :id: 71600d6b-1ef4-4b88-8e9b-eb2481ee1fe2

        :expectedresults: Lifecycle environment paths listed


        :CaseImportance: Critical
        """
        org = make_org()
        lc_env = make_lifecycle_environment({
            'organization-id': org['id'],
        })
        # Add paths to lifecycle environments
        result = LifecycleEnvironment.paths({
            'organization-id': org['id'],
            'permission-type': 'readable',
        })
        self.assertIn(
            u'Library >> {0}'.format(lc_env['name']),
            u''.join(result)
        )