Exemple #1
0
    def test_etag_dumps_to_header_format(self):
        etag = structures.ETag('67ab43')

        assert etag.dumps() == '"67ab43"'

        etag.is_weak = True
        assert etag.dumps() == 'W/"67ab43"'

        assert structures.ETag('67a b43').dumps() == '"67a b43"'
 def test_etag_to_header(self):
     etag = structures.ETag('67ab43')
     assert etag.to_header() == '"67ab43"'
     etag.is_weak = True
     assert etag.to_header() == 'W/"67ab43"'