File: test_http.py

package info (click to toggle)
python-httpretty 0.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 620 kB
  • ctags: 690
  • sloc: python: 2,842; makefile: 60
file content (17 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from httpretty.http import parse_requestline


def test_parse_request_line_connect():
    ("parse_requestline should parse the CONNECT method appropriately")

    # Given a valid request line string that has the CONNECT method
    line = "CONNECT / HTTP/1.1"

    # When I parse it
    result = parse_requestline(line)

    # Then it should return a tuple
    result.should.equal(("CONNECT", "/", "1.1"))