-
Notifications
You must be signed in to change notification settings - Fork 89
Gene variant look #5066
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
Gene variant look #5066
Conversation
…e-variant-look
…e-variant-look
| ) | ||
|
|
||
| def test_gene_variant_lookup(self): | ||
| url = reverse(gene_variant_lookup) |
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.
The pattern we generallyhave for search tests is we have a test that tests the request and response but mocks the actual backend helper function, and then we have tests that call the helpers directly and test their behavior. This is not an ideal way to test things as its vulnerable to missed bugs if the function signature changes at all, and is also a bit hard to read/maintain. The reason we have this elsewhere is in order to test shared vs different behavior across different backends, but for this entirely new function thats only available in clickhouse it felt better to just actually test the request end-to-end without any mocking. Once elasticsearch is fully deprecated all the other tests in this file will eventually be converted to this pattern and combined with the other request tests
clickhouse_search/search_tests.py
Outdated
|
|
||
|
|
||
| class ClickhouseSearchTests(DifferentDbTransactionSupportMixin, SearchTestHelper, TestCase): | ||
| class ClickhouseSearchTests(SearchTestHelper, AnvilAuthenticationTestCase): |
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.
I think this will conflict with the changes I made to the transaction management here on the affected status. Will we need to split DifferentDbTransactionSupportMixin out from AnvilAuthenticationTestCase?
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.
good point, I will refactor this so it can be integrated with your changes without conflict
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.
Okay I have refactored the test case to instead be a mixin that is usable here
…tute/seqr into gene-variant-look
| self.mock_get_group_members.assert_not_called() | ||
|
|
||
|
|
||
| class AnvilAuthenticationTestCase(DifferentDbTransactionSupportMixin, AnvilAuthenticationTestMixin, TestCase): |
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.
👍
Lookup all rare variants in a gene across all projects