summaryrefslogtreecommitdiff
path: root/bs4/tests/test_tree.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-02-15 14:44:05 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-02-15 14:44:05 -0500
commitac197c5ad0ffe0795436cb54e0766640d12c6a31 (patch)
tree23938b1e3f83692d893bb966b5470e78f1f28dd3 /bs4/tests/test_tree.py
parenta06152365c336f41bdb5fb9513b9316740c1564a (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.py4
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'>")