-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
test(backup): Ensure expected models are in output #52690
Conversation
3524e25
to
3a1a138
Compare
343e98c
to
53f568c
Compare
3a1a138
to
7d04736
Compare
53f568c
to
2e6e042
Compare
c697e1a
to
5774faf
Compare
5774faf
to
e45420c
Compare
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
7d04736
to
fcaea59
Compare
e45420c
to
faa54f8
Compare
fcaea59
to
d9f8423
Compare
faa54f8
to
2251d81
Compare
d9f8423
to
9d825bf
Compare
2251d81
to
bcdff0c
Compare
9d825bf
to
31afbf3
Compare
bcdff0c
to
d72d146
Compare
e91cdae
to
17479e4
Compare
d72d146
to
ffa3026
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #52690 +/- ##
==========================================
+ Coverage 77.00% 79.37% +2.36%
==========================================
Files 4934 4934
Lines 207215 207215
Branches 35403 35403
==========================================
+ Hits 159573 164478 +4905
+ Misses 42482 37706 -4776
+ Partials 5160 5031 -129 |
We add a new decorator, `@targets_models`, for the `.../backup/test_models.py` test suite. The goal is two-fold: for each individual test, the decorator provides a concise way to express which models must be included in the output, lest we end up with a test that passes the equality check, but only because it excluded our target model(s) altogether. The second goal is to make the set of models being exercised in the `ModelBackupTests` class easily visible to static analysis tools like flake8, so that we may later create a check ensuring that all `__include_in_export__ = True` marked models in this repository are included in this test suite. Issue: getsentry/team-ospo#156 Issue: getsentry/team-ospo#160
ffa3026
to
12b1476
Compare
We add a new decorator, `@targets_models`, for the `.../backup/test_models.py` test suite. The goal is two-fold: for each individual test, the decorator provides a concise way to express which models must be included in the output, lest we end up with a test that passes the equality check, but only because it excluded our target model(s) altogether. The second goal is to make the set of models being exercised in the `ModelBackupTests` class easily visible to static analysis tools like flake8, so that we may later create a check ensuring that all `__include_in_export__ = True` marked models in this repository are included in this test suite. Issue: getsentry/team-ospo#156 Issue: getsentry/team-ospo#160
We add a new decorator,
@targets_models
, for the.../backup/test_models.py
test suite. The goal is two-fold: for each individual test, the decorator provides a concise way to express which models must be included in the output, lest we end up with a test that passes the equality check, but only because it excluded our target model(s) altogether. The second goal is to make the set of models being exercised in theModelBackupTests
class easily visible to static analysis tools like flake8, so that we may later create a check ensuring that all__include_in_export__ = True
marked models in this repository are included in this test suite.Issue: getsentry/team-ospo#156
Issue: getsentry/team-ospo#160