Skip to content

Commit 068e532

Browse files
committed
fix failing tests: extensions, server
1 parent 7a4e093 commit 068e532

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

mfr/server/handlers/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def write_error(self, status_code, exc_info):
166166
# TODO: verify that `exc_info` arg is compatible with tornado 6.4.2 sig
167167
etype, exc, _ = exc_info
168168
scope = sentry_sdk.get_current_scope()
169-
scope.set_tag('class', etype.__name_)
169+
scope.set_tag('class', etype.__name__)
170170
scope.set_tag('status_code', status_code)
171171
sentry_sdk.capture_exception(exc) # Log all non 2XX codes to sentry
172172

tests/extensions/zip/test_renderer.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,21 @@ def test_render(self, renderer):
6868
parsed_html = BeautifulSoup(body)
6969
rows = parsed_html.findChildren('table')[0].findChildren(['tr'])
7070

71-
name = rows[3].findChildren('td')[0].get_text().strip()
72-
assert 'test/test 1' == name
73-
74-
date_modified = rows[3].findChildren('td')[1].get_text().strip()
71+
name = rows[2].findChildren('td')[0].get_text().strip()
72+
assert 'test/test 1' == name
7573

74+
date_modified = rows[2].findChildren('td')[1].get_text().strip()
7675
assert '2017-03-02 16:22:14' == date_modified
7776

78-
size = rows[3].findChildren('td')[2].get_text().strip()
77+
size = rows[2].findChildren('td')[2].get_text().strip()
7978
assert '15B' == size
8079

8180
# non-expanded zip file should have no children
82-
name = rows[5].findChildren('td')[0].get_text().strip()
81+
name = rows[4].findChildren('td')[0].get_text().strip()
8382
assert 'test/zip file which is not expanded.zip' == name
8483
assert body.count('zip file which is not expanded.zip') == 1
8584

86-
size = rows[5].findChildren('td')[2].get_text().strip()
85+
size = rows[4].findChildren('td')[2].get_text().strip()
8786
assert '1.8KB' == size # formatting of larger byte sizes
8887

8988
# hidden files should be hidden

0 commit comments

Comments
 (0)