Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aas_test_engines/test_cases/v3_0/api.py: test_include_concept_descriptions empty results error #78

Open
Frosty2500 opened this issue Dec 3, 2024 · 1 comment

Comments

@Frosty2500
Copy link

In test_include_concept_descriptions it is not checked if the data is empty, which leads to the error

    _assert('conceptDescriptions' in data, 'contains conceptDescriptions', Level.WARNING)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

when testing our server.
This is fixed by adding the following assertion.

_assert(data is not None, 'Result is not empty')

So when I use this method

def test_include_concept_descriptions(self):
    """
    Invoke with includeConceptDescriptions    """    request = generate_one_valid(self.operation, self.sample_cache, {'includeConceptDescriptions': True})
    data = _invoke_and_decode(request, self.conf, True)
    _assert(data is not None, 'Result is not empty')
    _assert('conceptDescriptions' in data, 'contains conceptDescriptions', Level.WARNING)

it is possible to test our server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Frosty2500 and others