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
CB-369: Write a review page shows incorrect information depending on if the item is a work or artist #307
Conversation
Did you take a look at the key = cache.gen_key('artist', mbid) so that the key will end up as something like Can you confirm what the behaviour is with this fix if we visit |
No, I actually forgot to look at the documentation for
Yes, I double checked that there is an error displayed for the case.
I don't think there is a test case for this or even if there were one this error would probably slip past it because of mocking the cache in tests. But now that I look again I was unable to find any instance of mocking the cache except |
5e8cf60
to
f3665f4
Compare
I have updated the tests. However, the tests are failing if run together. If only the cache tests are run, they pass successfully. I think I have narrowed down the problem. It seems that it is an issue with how other tests mock the methods we are trying to test. But I am not sure. |
I have fixed the issue and pushed the changes. The |
I guess we don't use
alternatively, we just |
@amCap1712 can you rebase after the flake8 changes? |
I'll do the rebase and update the PR. Yeah, we decided to |
Thanks, these changes look a lot better. Looking through the statistics_test file I see two other things:
|
I think the only purpose here is to disable the redis cache as the comment said in the |
are there any tests that check if these methods correctly write to the cache when called? |
Sure, I'll add the checks. |
I have added the check. I have also removed the mocks from other methods where only the |
That's great! This is an advantage to explicitly using mock.patch - we only patch things that we need to |
Use both entity type and mbid as cache key
JIRA: CB-369