'Adding a wrong level protocol raises an exception.'

def testAddingBadProtos_WrongLevel(self):

    e = rawudp.RawUDPProtocol()
    try:
        e.addProto(42, 'silliness')
    except TypeError as e:
        if (e.args == ('Added    protocol    must    be    an    instance    of    DatagramProtocol',)):
            pass
        else:
            raise
    else:
        raise AssertionError('addProto    must    raise    an    exception    for    bad    protocols')
