コード例 #1
0
    def test_list_endpoint(self, created_endpoints):
        client = Client()
        path = _utils.generate_default_name()
        path2 = _utils.generate_default_name()
        endpoint1 = client.get_or_create_endpoint(path)
        endpoint2 = client.get_or_create_endpoint(path2)
        created_endpoints.append(endpoint1)
        created_endpoints.append(endpoint2)
        runner = CliRunner()
        result = runner.invoke(
            cli,
            ['deployment', 'list', 'endpoint'],
        )

        assert not result.exception
        assert path in result.output
        assert path2 in result.output
コード例 #2
0
    def test_list_endpoint(self, organization, created_entities):
        client = Client()
        path = _utils.generate_default_name()
        path2 = _utils.generate_default_name()
        endpoint1 = client.get_or_create_endpoint(path,
                                                  workspace=organization.name)
        endpoint2 = client.get_or_create_endpoint(path2,
                                                  workspace=organization.name)
        created_entities.append(endpoint1)
        created_entities.append(endpoint2)
        runner = CliRunner()
        result = runner.invoke(
            cli,
            [
                'deployment', 'list', 'endpoint', '--workspace',
                organization.name
            ],
        )

        assert not result.exception
        assert path in result.output
        assert path2 in result.output