-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[WIP] SA2.0, model/data-access edits, unit testing #17662
Conversation
@@ -335,3 +337,12 @@ def serialize_job_state_summary(self, item, key, **context): | |||
def serialize_elements_datatypes(self, item, key, **context): | |||
extensions_set = item.dataset_dbkeys_and_extensions_summary[1] | |||
return list(extensions_set) | |||
|
|||
|
|||
def get_hdca_by_name(session, name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to belong in managers to me because it doesn't use trans or app. Also this code is only used in tests as far as I can grep - should just be moved to galaxy.model.unittest_utils.model_testing_utils
or a new file like galaxy.model.unittest_utils.helpers
. I think there is something jarring about seeing code like this mixed with app logic - I was immediately scared we were accessing data this way from the app.
0aba698
to
1ce7dfd
Compare
Tests SQLAlchemy: 1. Create tag 2. Verify there's no FooTagAssociation with this tag 3. Add new FooTagAssociation to Foo and save to db 4. Verify there is one FooTagAssociation with this tag
No assert (only TODO); but would test SQLAlchemy
Tests SQLAlchemy, user-history relationship mapping
Tests SQLAlchemy (create foo + set foo.bar + load foo + check bar)
Superseded by #18312 (code review comments addressed) |
Replaces #17551 (accidentally deleted the remote branch due to slip of the finger)
Simple model and data-access unit testing. Db created and loaded once per session; cleared after each test. Dependent model instances created recursively as needed, with provided arguments or reasonable defaults.
Draft.
Builds on #17180.
How to test the changes?
(Select all options that apply)
License