def test_IfMatchHeader(self):
    server = Session('www.example.com')
    request = Head(server, '/')
    request.setData(None, etag='"12345"')
    hdrs = request.generateRequestHeader()
    self.assertFalse(('If-None-Match:' in hdrs))
    self.assertTrue(('If-Match: "12345"' in hdrs))
def test_IfMatchHeader(self):
    server = Session('www.example.com')
    request = Head(server, '/')
    request.setData(None, etag='"12345"')
    hdrs = request.generateRequestHeader()
    self.assertFalse(('If-None-Match:' in hdrs))
    self.assertTrue(('If-Match: "12345"' in hdrs))