File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
+ from http import HTTPStatus
2
3
from collections import OrderedDict
3
4
4
5
import pytest
@@ -42,16 +43,16 @@ def test_tsv_stdlib_exception_raises(self):
42
43
with open (os .path .join (BASE , 'files' , 'invalid.tsv' )) as fp :
43
44
with pytest .raises (EmptyTableError ) as e :
44
45
stdlib_tools .tsv_stdlib (fp )
45
- assert e .value .code == 400
46
+ assert e .value .code == HTTPStatus . BAD_REQUEST
46
47
47
48
def test_csv_stdlib_exception_raises (self ):
48
49
with open (os .path .join (BASE , 'files' , 'invalid.csv' )) as fp :
49
50
with pytest .raises (EmptyTableError ) as e :
50
51
stdlib_tools .tsv_stdlib (fp )
51
- assert e .value .code == 400
52
+ assert e .value .code == HTTPStatus . BAD_REQUEST
52
53
53
54
def test_csv_stdlib_other_exception_raises (self ):
54
55
with open (os .path .join (BASE , 'files' , 'invalid_null.csv' )) as fp :
55
56
with pytest .raises (TabularRendererError ) as e :
56
57
stdlib_tools .tsv_stdlib (fp )
57
- assert e .value .code == 400
58
+ assert e .value .code == HTTPStatus . BAD_REQUEST
You can’t perform that action at this time.
0 commit comments