Test all usecases' asset forms - #517
Open
Bachibouzouk wants to merge 9 commits into
Open
Conversation
paulapreuss
reviewed
Sep 8, 2026
| asset_type=asset["asset_type"], | ||
| ): | ||
| form_url = reverse( | ||
| "get_asset_create_form", |
There was a problem hiding this comment.
So the case in which this test would fail would be if there is a field in the json usecase which doesn't match the form fields, triggering maybe a KeyError? I'm wondering if this wouldn't already cause project_upload to fail, as that also tries to load the Asset data into the database.
Author
There was a problem hiding this comment.
Now I refined the test so that if fails more specifically, it should also tell us if a project could not be uploaded.
Otherwise reverse() cannot be used with re_path
It downloads the usecase from open_plan and loads them into the test database Then it collects all the assets' IDs and with them, call the endpoint to get the form obtained when double clicking on the asset icon in the GUI.
Bachibouzouk
force-pushed
the
feature/test-all-usecases-asset-forms
branch
from
September 9, 2026 11:13
cfc6a16 to
47984cd
Compare
Bachibouzouk
marked this pull request as ready for review
September 9, 2026 11:13
Not limited to usecases projects
Endpoint needed the option to provide only 2 of the 3 arguments
This was just not nice to see in the test logs ^^
Bachibouzouk
commented
Sep 10, 2026
Author
There was a problem hiding this comment.
I think this file wasn't used anywere
To be able to access the form when clicking on the asset in the GUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To run just this test:
python manage.py test projects.tests.ImportedUsecaseTestor
python manage.py test --tag=integration_testAnd to run all test without this one
python manage.py test --exclude-tag=integration_test