Skip to content

Commit

Permalink
Adding test for named parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
James Socol committed Feb 23, 2010
1 parent 880cd98 commit 127d042
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bleach/tests/test_basics.py
Expand Up @@ -29,6 +29,14 @@ def test_function_arguments():
tags=TAGS, attributes=ATTRS))


def test_named_arguments():
ATTRS = {'a': ['rel', 'href']}
s = u'<a href="http://xx.com" rel="alternate">xx.com</a>'
eq_('<a href="http://xx.com">xx.com</a>', b.clean(s))
eq_(s, b.clean(s, attributes=ATTRS))



def test_disallowed_html():
eq_('a &lt;script&gt;safe()&lt;/script&gt; test',
b.clean('a <script>safe()</script> test'))
Expand Down

0 comments on commit 127d042

Please sign in to comment.