OPSI.web2.test.test_http_headers module¶
-
class
OPSI.web2.test.test_http_headers.
DateTimeTest
(methodName='runTest')¶ Bases:
twisted.trial._asynctest.TestCase
Test date parsing functions.
-
testGenerate
()¶
-
testParse
()¶
-
testRoundtrip
()¶
-
-
class
OPSI.web2.test.test_http_headers.
EntityHeaderParsingTests
(methodName='runTest')¶ Bases:
OPSI.web2.test.test_http_headers.HeaderParsingTestBase
-
testAllow
()¶
-
testContentEncoding
()¶
-
testContentLanguage
()¶
-
testContentLength
()¶
-
testContentLocation
()¶
-
testContentMD5
()¶
-
testContentRange
()¶
-
testContentType
()¶
-
testExpires
()¶
-
testLastModified
()¶
-
-
class
OPSI.web2.test.test_http_headers.
GeneralHeaderParsingTests
(methodName='runTest')¶ Bases:
OPSI.web2.test.test_http_headers.HeaderParsingTestBase
-
testCacheControl
()¶
-
testConnection
()¶
-
testDate
()¶
-
testTransferEncoding
()¶
-
-
class
OPSI.web2.test.test_http_headers.
HeaderParsingTestBase
(methodName='runTest')¶ Bases:
twisted.trial._asynctest.TestCase
-
invalidParseTest
(headername, values)¶
-
runRoundtripTest
(headername, table)¶ Perform some assertions about the behavior of parsing and generating HTTP headers. Specifically: parse an HTTP header value, assert that the parsed form contains all the available information with the correct structure; generate the HTTP header value from the parsed form, assert that it contains certain literal strings; finally, re-parse the generated HTTP header value and assert that the resulting structured data is the same as the first-pass parsed form.
@type headername: C{str} @param headername: The name of the HTTP header L{table} contains values for.
@type table: A sequence of tuples describing inputs to and outputs from header parsing and generation. The tuples may be either 2 or 3 elements long. In either case: the first element is a string representing an HTTP-format header value; the second element is a dictionary mapping names of parameters to values of those parameters (the parsed form of the header). If there is a third element, it is a list of strings which must occur exactly in the HTTP header value string which is re-generated from the parsed form.
-
-
class
OPSI.web2.test.test_http_headers.
HeadersAPITest
(methodName='runTest')¶ Bases:
twisted.trial._asynctest.TestCase
Make sure the public API exists and works.
-
testImmutable
()¶
-
testParsed
()¶
-
testParsedAndRaw
()¶
-
testRaw
()¶
-
-
class
OPSI.web2.test.test_http_headers.
RequestHeaderParsingTests
(methodName='runTest')¶ Bases:
OPSI.web2.test.test_http_headers.HeaderParsingTestBase
-
testAccept
()¶
-
testAcceptCharset
()¶
-
testAcceptEncoding
()¶
-
testAcceptLanguage
()¶
-
testAuthorization
()¶
-
testCookie
()¶
-
testExpect
()¶
-
testFrom
()¶
-
testHost
()¶
-
testIfMatch
()¶
-
testIfModifiedSince
()¶
-
testIfNoneMatch
()¶
-
testIfRange
()¶
-
testIfUnmodifiedSince
()¶
-
testMaxForwards
()¶
-
testRange
()¶
-
testReferer
()¶
-
testSetCookie
()¶
-
testSetCookie2
()¶
-
testTE
()¶
-
testUserAgent
()¶
-
-
class
OPSI.web2.test.test_http_headers.
ResponseHeaderParsingTests
(methodName='runTest')¶ Bases:
OPSI.web2.test.test_http_headers.HeaderParsingTestBase
-
testAcceptRanges
()¶
-
testAge
()¶
-
testETag
()¶
-
testLocation
()¶
-
testRetryAfter
()¶
-
testServer
()¶
-
testVary
()¶
-
testWWWAuthenticate
()¶
-
-
class
OPSI.web2.test.test_http_headers.
TestMimeType
(methodName='runTest')¶ Bases:
twisted.trial._asynctest.TestCase
-
testEquality
()¶ Test that various uses of the constructer are equal
-
-
class
OPSI.web2.test.test_http_headers.
TokenizerTest
(methodName='runTest')¶ Bases:
twisted.trial._asynctest.TestCase
Test header list parsing functions.
-
testGenerate
()¶
-
testParse
()¶
-
testRoundtrip
()¶
-
-
OPSI.web2.test.test_http_headers.
atSpecifiedTime
(when, func)¶
-
OPSI.web2.test.test_http_headers.
generateHeader
(*a, **kw)¶
-
OPSI.web2.test.test_http_headers.
parseHeader
(*a, **kw)¶
-
class
OPSI.web2.test.test_http_headers.
parsedvalue
(raw)¶ Marker class