예제 #1
0
파일: test_hyper.py 프로젝트: jjdoor/goods
    def test_fileno_not_implemented(self):
        headers = HTTPHeaderMap([(':status', '200')])
        resp = HTTP20Response(headers, DummyStream(b''))

        with pytest.raises(NotImplementedError):
            resp.fileno()
예제 #2
0
파일: test_hyper.py 프로젝트: ami-GS/hyper
    def test_status_is_stripped_from_headers(self):
        headers = {':status': '200'}
        resp = HTTP20Response(headers, None)

        assert resp.status == 200
        assert resp.getheaders() == []
예제 #3
0
파일: test_hyper.py 프로젝트: jjdoor/goods
    def test_status_is_stripped_from_headers(self):
        headers = HTTPHeaderMap([(':status', '200')])
        resp = HTTP20Response(headers, None)

        assert resp.status == 200
        assert not resp.headers