diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-15 14:44:05 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-15 14:44:05 -0500 |
commit | ac197c5ad0ffe0795436cb54e0766640d12c6a31 (patch) | |
tree | 23938b1e3f83692d893bb966b5470e78f1f28dd3 /bs4/tests/test_tree.py | |
parent | a06152365c336f41bdb5fb9513b9316740c1564a (diff) |
The value of multi-valued attributes like class are always turned into a list, even if there's only one value.
Diffstat (limited to 'bs4/tests/test_tree.py')
-rw-r--r-- | bs4/tests/test_tree.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py index 8e61429..3684777 100644 --- a/bs4/tests/test_tree.py +++ b/bs4/tests/test_tree.py @@ -1045,9 +1045,9 @@ class TestCDAtaListAttributes(SoupTest): """Testing cdata-list attributes like 'class'. """ - def test_single_value_stays_string(self): + def test_single_value_becomes_list(self): soup = self.soup("<a class='foo'>") - self.assertEqual("foo",soup.a['class']) + self.assertEqual(["foo"],soup.a['class']) def test_multiple_values_becomes_list(self): soup = self.soup("<a class='foo bar'>") |