Fix some problems with connected resources #396
Merged
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.
What does this PR do?
Resolves several problems with connected resources.
Description of the Change
At some point in the past
connect_idwas an abstract method on the base class, but it hasn't been abstract for a while, there's a default implementation now. Usingpassskips over that default implementation when some classes might require it. We removed these methods that just skip the base method from several models.The new synthetics mobile application classes and connecting resources were affected, but didn't have tests so we've added tests. These tests upload a binary file (an android apk file), since we record the tests we need to deal with recording that binary data so some changes to
conftest.pyThe tests revealed a hidden dependency. Some synthetics tests depend on mobile applications. Mobile application versions also depend on mobile applications. Those are both easy relationships to deal with because there's an
idwe use for association like every other resource (think of the id as a foreign key). However, to successfully create a link from a test to a mobile application that mobile application needs to have a version associated with it. So we add all versions of the specific app as test dependencies. These changes are inresources_handler.pyThe mobile application model also had some extra fields that we cannot pass to the API and a circular dependency defined that was removed.
Finally, we generated cassettes. However, some of the mobile application tests generated cassettes that were too large for github, so the tests are skipped. Github actions won't run them but can be run locally if needed.