-
Notifications
You must be signed in to change notification settings - Fork 192
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
uncaught issue in restapi #1390
Comments
In above test case schema is not required to download cif data. So if there is problem to get node schema, above test should and will pass. We need to add separate testcases to check schema |
@waychal What I don't understand is why this line If you let me know, I can prepare the test. |
@waychal Are you going to work on this soon? |
@ltalirz I guess we do not have any tests available for schema. Its better to add some. |
It seems they aren't. |
@ltalirz Error was in below if condition: - if self.custom_schema is not None and 'columns' in self.custom_schema:
+ if self.custom_schema is not None and self.__label__ in self.custom_schema['columns'].keys():
self._default_projections = self.custom_schema['columns'][
self.__label__]
else:
self._default_projections = ['**'] in case of testing, self.custom_schema is always None so its goes to else condition and test passes. In browser, if you have custom_schema file in common folder, if condition becomes true (self.custom_schema is not None and 'columns' in self.custom_schema) and it gives internal server error for line: I have fixed the if condition and created PR. |
@waychal Thanks a lot for investigating this and finding the problem! |
Fixed in PR #1490 |
The current schema does not contain an entry for cifdata.
A request like
http://localhost:5000/api/v2/cifs/
therefore returns an internal server error.The interesting thing is that there is a test for the
cifs
endpoints and it passes:https://github.com/aiidateam/aiida_core/blob/7b3113c7a9b998a8685e49e31a1cac8d2d2a997d/aiida/backends/tests/restapi.py#L792-L805
The reason seems to be that it is using the
app.test_client()
(?).@waychal We need to find a way of testing that the schema is complete.
Anyhow, it probably makes sense to wait until the schema has been integrated in the source code in a "proper" way.
The text was updated successfully, but these errors were encountered: