Skip to content

Commit d9dc5f3

Browse files
httpstatus in tests
1 parent 93235e1 commit d9dc5f3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/extensions/tabular/test_stdlib_tools.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from http import HTTPStatus
23
from collections import OrderedDict
34

45
import pytest
@@ -42,16 +43,16 @@ def test_tsv_stdlib_exception_raises(self):
4243
with open(os.path.join(BASE, 'files', 'invalid.tsv')) as fp:
4344
with pytest.raises(EmptyTableError) as e:
4445
stdlib_tools.tsv_stdlib(fp)
45-
assert e.value.code == 400
46+
assert e.value.code == HTTPStatus.BAD_REQUEST
4647

4748
def test_csv_stdlib_exception_raises(self):
4849
with open(os.path.join(BASE, 'files', 'invalid.csv')) as fp:
4950
with pytest.raises(EmptyTableError) as e:
5051
stdlib_tools.tsv_stdlib(fp)
51-
assert e.value.code == 400
52+
assert e.value.code == HTTPStatus.BAD_REQUEST
5253

5354
def test_csv_stdlib_other_exception_raises(self):
5455
with open(os.path.join(BASE, 'files', 'invalid_null.csv')) as fp:
5556
with pytest.raises(TabularRendererError) as e:
5657
stdlib_tools.tsv_stdlib(fp)
57-
assert e.value.code == 400
58+
assert e.value.code == HTTPStatus.BAD_REQUEST

0 commit comments

Comments
 (0)