@@ -65,24 +65,24 @@ class TestZipRenderer:
6565
6666 def test_render (self , renderer ):
6767 body = renderer .render ()
68- parsed_html = BeautifulSoup (body )
69- rows = parsed_html .findChildren ('table' )[0 ].findChildren (['tr' ])
68+ parsed_html = BeautifulSoup (body , 'html.parser' )
69+ rows = parsed_html .find_all ('table' )[0 ].find_all (['tr' ])
7070
71- name = rows [2 ].findChildren ('td' )[0 ].get_text ().strip ()
71+ name = rows [2 ].find_all ('td' )[0 ].get_text ().strip ()
7272 assert 'test/test 1' == name
7373
74- date_modified = rows [2 ].findChildren ('td' )[1 ].get_text ().strip ()
74+ date_modified = rows [2 ].find_all ('td' )[1 ].get_text ().strip ()
7575 assert '2017-03-02 16:22:14' == date_modified
7676
77- size = rows [2 ].findChildren ('td' )[2 ].get_text ().strip ()
77+ size = rows [2 ].find_all ('td' )[2 ].get_text ().strip ()
7878 assert '15B' == size
7979
8080 # non-expanded zip file should have no children
81- name = rows [4 ].findChildren ('td' )[0 ].get_text ().strip ()
81+ name = rows [4 ].find_all ('td' )[0 ].get_text ().strip ()
8282 assert 'test/zip file which is not expanded.zip' == name
8383 assert body .count ('zip file which is not expanded.zip' ) == 1
8484
85- size = rows [4 ].findChildren ('td' )[2 ].get_text ().strip ()
85+ size = rows [4 ].find_all ('td' )[2 ].get_text ().strip ()
8686 assert '1.8KB' == size # formatting of larger byte sizes
8787
8888 # hidden files should be hidden
0 commit comments