summaryrefslogtreecommitdiff
path: root/test/unit/test_policy_deciding.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_policy_deciding.py')
-rw-r--r--test/unit/test_policy_deciding.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/test_policy_deciding.py b/test/unit/test_policy_deciding.py
index a360537..88095af 100644
--- a/test/unit/test_policy_deciding.py
+++ b/test/unit/test_policy_deciding.py
@@ -61,11 +61,11 @@ def test_decide_policy(execute_in_page):
policy = execute_in_page(
'''{
const tree = pqt.make();
- pqt.register(tree, "http://kno.wn", "allowed", {allow: true});
+ pqt.register(tree, "http://kno.wn", "~allow", 1);
returnval(decide_policy(tree, "http://kno.wn/", false, "abcd"));
}''')
assert policy['allow'] == True
- assert policy['mapping'] == 'allowed'
+ assert policy['mapping'] == '~allow'
for prop in ('payload', 'nonce', 'csp'):
assert prop not in policy
@@ -87,11 +87,11 @@ def test_decide_policy(execute_in_page):
policy = execute_in_page(
'''{
const tree = pqt.make();
- pqt.register(tree, "http://kno.wn", "disallowed", {allow: false});
+ pqt.register(tree, "http://kno.wn", "~allow", 0);
returnval(decide_policy(tree, "http://kno.wn/", true, "abcd"));
}''')
assert policy['allow'] == False
- assert policy['mapping'] == 'disallowed'
+ assert policy['mapping'] == '~allow'
for prop in ('payload', 'nonce'):
assert prop not in policy
assert parse_csp(policy['csp']) == {