You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2025. It is now read-only.
Here I tried to test for the results in the response. I've limited most of it to less than the default page size, so that even the randomisation would not take effect and drop some off the page.
Still seems as if it was failing at random places, sometimes containing the expected results and if I wait a minute or two to repeat the tests, they suddenly fail at the same point.
I experienced some issues with the cache being on while running the tests and would guess, that it might have to do with that.
Testing with an actual active cache defies the sense of testing code, because most of the time, you will not be testing the code, but only the cached response.
Do you have mechanisms in place to disable cache in tests completely? I haven't seen anything like it (i.e. in test settings or so). https://github.com/shoutit/shoutit-api/compare/test_misc?expand=1#diff-d2e3a0c2b2bd55e14fc17b4b975f920cR282
When creating fixtures for CreditTransaction it calls self.rule.display() and fail with NotImplementedError. I'm using a rule, that has the method implemented, but still failing.
This is due to the initialization of subclasses not done prior to the call of display(). It is basically calling the method of the superclass.
Monkey patched ShoutitJSONSerializer causes RuntimeError due to max recursion depth.
Fixed in Dev.
API docs example does not work for all misc FB endpoints. Also BTW, the GET methods describe it expecting POST data and so on. So I assume docs are wrong, kind of?
Facebook sends regular form body not JSON
Regarding the suggestion endpoint. It is problematic by design and actually the most time consuming endpoint. It needs refactoring or complete change. I would skip it for now and only make sure it is at least not crashing. Empty arrays should be fine as long the correct keys exist.
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 freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
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.
When creating fixtures for
CreditTransactionit callsself.rule.display()and fail withNotImplementedError. I'm using a rule, that has the method implemented, but still failing.https://github.com/shoutit/shoutit-api/compare/test_misc?expand=1#diff-78647ee16003f16aa9c144f2b16f1cb2R26
Monkey patched
ShoutitJSONSerializercausesRuntimeErrordue to max recursion depth.https://github.com/shoutit/shoutit-api/compare/test_misc?expand=1#diff-d2e3a0c2b2bd55e14fc17b4b975f920cR53
API docs example does not work for all misc FB endpoints. Also BTW, the GET methods describe it expecting POST data and so on. So I assume docs are wrong, kind of?
https://github.com/shoutit/shoutit-api/compare/test_misc?expand=1#diff-d2e3a0c2b2bd55e14fc17b4b975f920cR75
FYI: The endpoint switches between "New York" and "Jersey City" for the coordinates in the docs even though it's clearly in Jersey. I chose "Berlin" for the tests to make sure they pass.
https://github.com/shoutit/shoutit-api/compare/test_misc?expand=1#diff-d2e3a0c2b2bd55e14fc17b4b975f920cR164
Here I tried to test for the results in the response. I've limited most of it to less than the default page size, so that even the randomisation would not take effect and drop some off the page.
Still seems as if it was failing at random places, sometimes containing the expected results and if I wait a minute or two to repeat the tests, they suddenly fail at the same point.
I experienced some issues with the cache being on while running the tests and would guess, that it might have to do with that.
Testing with an actual active cache defies the sense of testing code, because most of the time, you will not be testing the code, but only the cached response.
Do you have mechanisms in place to disable cache in tests completely? I haven't seen anything like it (i.e. in test settings or so).
https://github.com/shoutit/shoutit-api/compare/test_misc?expand=1#diff-d2e3a0c2b2bd55e14fc17b4b975f920cR282