diff options
author | Per Andersson <avtobiff@gmail.com> | 2013-06-09 19:45:54 +0200 |
---|---|---|
committer | Per Andersson <avtobiff@gmail.com> | 2013-06-09 19:45:54 +0200 |
commit | fac84c6d90e0875e6c1b10c5ef02d577ee008af4 (patch) | |
tree | 4080efdb87c814d5dc409e9e87aa449f4b273ff3 /bleach/tests/test_css.py | |
parent | 38dc3b8f231cf36bcc771001318556d9e84c2889 (diff) | |
download | python-bleach-fac84c6d90e0875e6c1b10c5ef02d577ee008af4.tar python-bleach-fac84c6d90e0875e6c1b10c5ef02d577ee008af4.tar.gz |
Imported Upstream version 1.2.2upstream/1.2.2
Diffstat (limited to 'bleach/tests/test_css.py')
-rw-r--r-- | bleach/tests/test_css.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bleach/tests/test_css.py b/bleach/tests/test_css.py index fdb3f65..588c8ce 100644 --- a/bleach/tests/test_css.py +++ b/bleach/tests/test_css.py @@ -22,13 +22,21 @@ def test_allowed_css(): ('cursor: -moz-grab;', 'cursor: -moz-grab;', ['cursor']), ('color: hsl(30,100%,50%);', 'color: hsl(30,100%,50%);', ['color']), ('color: rgba(255,0,0,0.4);', 'color: rgba(255,0,0,0.4);', ['color']), - ("text-overflow: ',' ellipsis;", "text-overflow: ',' ellipsis;", ['text-overflow']), + ("text-overflow: ',' ellipsis;", "text-overflow: ',' ellipsis;", + ['text-overflow']), + ('text-overflow: "," ellipsis;', 'text-overflow: "," ellipsis;', + ['text-overflow']), + ('font-family: "Arial";', 'font-family: "Arial";', ['font-family']), ) - p = '<p style="%s">bar</p>' + p_single = '<p style="%s">bar</p>' + p_double = "<p style='%s'>bar</p>" - def check(input, output, styles): - eq_(p % output, clean(p % input, styles=styles)) + def check(i, o, s): + if '"' in i: + eq_(p_double % o, clean(p_double % i, styles=s)) + else: + eq_(p_single % o, clean(p_single % i, styles=s)) for i, o, s in tests: yield check, i, o, s |