'L{HTTPParser.switchToBodyMode} raises L{RuntimeError} if called more
than once.'

def test_switchToBodyMode(self):

    protocol = HTTPParser()
    protocol.makeConnection(StringTransport())
    protocol.switchToBodyMode(object())
    self.assertRaises(RuntimeError, protocol.switchToBodyMode, object())
