Oops...should run the tests before submitting new assertions :)

This commit is contained in:
Jeremy Fincher 2003-04-20 17:28:26 +00:00
parent 2227f5caae
commit df66715089

View File

@ -373,7 +373,7 @@ def join(channel, key=None, prefix=''):
if key is None: if key is None:
return IrcMsg(prefix=prefix, command='JOIN', args=(channel,)) return IrcMsg(prefix=prefix, command='JOIN', args=(channel,))
else: else:
assert key.translate(string.ascii, string.ascii[128:]) == '' and \ assert key.translate(string.ascii, string.ascii[128:]) == key and \
'\x00' not in key and \ '\x00' not in key and \
'\r' not in key and \ '\r' not in key and \
'\n' not in key and \ '\n' not in key and \
@ -395,7 +395,7 @@ def joins(channels, keys=None, prefix=''):
args=(','.join(channels),)) args=(','.join(channels),))
else: else:
for key in keys: for key in keys:
assert key.translate(string.ascii, string.ascii[128:]) == '' and \ assert key.translate(string.ascii, string.ascii[128:]) == key and \
'\x00' not in key and \ '\x00' not in key and \
'\r' not in key and \ '\r' not in key and \
'\n' not in key and \ '\n' not in key and \