Move the old access policy tests into their modern test suites.
Review Request #10648 — Created July 26, 2019 and submitted
One of the older sets of unit tests we had was the "policy" tests, which
checked the.accessible()
methods on some managers and
.is_accessible_by()
methods on some models. These coveredGroup
,
Repository
, andReviewRequest
models (and managers), but weren't
part of theor respective test suites.This gets rid of the old policy test suite, modernizes/cleans up the
tests, and moves them into the proper test suites. This enhances test
coverage and prepares for some upcoming unit tests to refine behavior
and fix bugs.
Unit tests pass.
Description | From | Last Updated |
---|---|---|
F401 'django.contrib.auth.models.User' imported but unused |
reviewbot | |
F401 'django.contrib.contenttypes.models.ContentType' imported but unused |
reviewbot | |
F401 'reviewboard.reviews.models.Group' imported but unused |
reviewbot | |
F401 'django.contrib.auth.models.User' imported but unused |
reviewbot | |
F841 local variable 'user' is assigned to but never used |
reviewbot | |
F401 'django.contrib.auth.models.User' imported but unused |
reviewbot | |
F401 'django.contrib.auth.models.User' imported but unused |
reviewbot | |
F401 'reviewboard.scmtools.models.Tool' imported but unused |
reviewbot |
- Change Summary:
-
Removed unused imports and variables.
- Commit:
-
8c5432fc663d60adff0c6a2cd1c32bff939c486e2b76faf73b7aa16b54479d17124ce39a1a72b3ee
- Diff:
-
Revision 2 (+754 -265)