Add app_name prefix to the generated PII report.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Tests for Paver's PII checker task.
|
||||
"""
|
||||
from io import open
|
||||
import io
|
||||
import six
|
||||
from mock import patch
|
||||
from paver.easy import call_task
|
||||
@@ -31,4 +31,4 @@ def test_pii_check_report_dir_override(mock_paver_sh, mock_needs, tmpdir):
|
||||
assert any(['cms.envs.test' in call for call in mock_calls])
|
||||
assert all([six.text_type(report_dir) in call for call in mock_calls])
|
||||
metrics_file = Env.METRICS_DIR / 'pii'
|
||||
assert open(metrics_file, 'r').read() == '66'
|
||||
assert io.open(metrics_file, 'r').read() == '66'
|
||||
|
||||
@@ -808,9 +808,9 @@ def run_pii_check(options): # pylint: disable=unused-argument
|
||||
"mkdir -p {} && "
|
||||
"export DJANGO_SETTINGS_MODULE={}; "
|
||||
"code_annotations django_find_annotations "
|
||||
"--config_file .pii_annotations.yml --report_path {} "
|
||||
"--config_file .pii_annotations.yml --report_path {} --app_name {} "
|
||||
"--lint --report --coverage | tee {}".format(
|
||||
report_dir, env_settings_file, report_dir, run_output_file
|
||||
report_dir, env_settings_file, report_dir, env_name.lower(), run_output_file
|
||||
)
|
||||
)
|
||||
uncovered_model_counts.append(_extract_missing_pii_annotations(run_output_file))
|
||||
|
||||
Reference in New Issue
Block a user