diff options
Diffstat (limited to 'chrome/browser/policy/test/policy_testserver.py')
-rw-r--r-- | chrome/browser/policy/test/policy_testserver.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/policy/test/policy_testserver.py b/chrome/browser/policy/test/policy_testserver.py index 1ccf35a..5f4ca45 100644 --- a/chrome/browser/policy/test/policy_testserver.py +++ b/chrome/browser/policy/test/policy_testserver.py @@ -47,7 +47,9 @@ Example: "secret123456" ], "current_key_index": 0, - "robot_api_auth_code": "fake_auth_code" + "robot_api_auth_code": "fake_auth_code", + "invalidation_source": 1025, + "invalidation_name": "UENUPOL" } """ @@ -595,6 +597,14 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): policy_data.service_account_identity = policy.get( 'service_account_identity', 'policy_testserver.py-service_account_identity') + invalidation_source = policy.get('invalidation_source') + if invalidation_source is not None: + policy_data.invalidation_source = invalidation_source + # Since invalidation_name is type bytes in the proto, the Unicode name + # provided needs to be encoded as ASCII to set the correct byte pattern. + invalidation_name = policy.get('invalidation_name') + if invalidation_name is not None: + policy_data.invalidation_name = invalidation_name.encode('ascii') if signing_key: policy_data.public_key_version = current_key_index + 1 |