~marting/+junk/beautifulsoup

« back to all changes in this revision

Viewing changes to bs4/tests/test_tree.py

  • Committer: Leonard Richardson
  • Date: 2017-05-07 01:38:56 UTC
  • Revision ID: leonardr@segfault.org-20170507013856-tayo7iulhnl3px0x
Replace get_attribute_text with get_attribute_list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1286
1286
        soup = self.soup("<a class='foo\tbar'>")
1287
1287
        self.assertEqual(b'<a class="foo bar"></a>', soup.a.encode())
1288
1288
 
1289
 
    def test_attribute_values_joined_into_string_through_string_attr(self):
1290
 
        soup = self.soup("<a class='foo\tbar'>")
1291
 
        self.assertEqual('foo bar', soup.a.get_attribute_text('class'))
 
1289
    def test_get_attribute_list(self):
 
1290
        soup = self.soup("<a id='abc def'>")
 
1291
        self.assertEqual(['abc def'], soup.a.get_attribute_list('id'))
1292
1292
        
1293
1293
    def test_accept_charset(self):
1294
1294
        soup = self.soup('<form accept-charset="ISO-8859-1 UTF-8">')