python3 compatibility
This commit is contained in:
parent
7a3251ddfc
commit
131951c976
@ -11,7 +11,7 @@ from isso.spam import Guard
|
||||
from isso.utils import Bloomfilter
|
||||
from isso.models import Comment
|
||||
|
||||
from isso.compat import string_types
|
||||
from isso.compat import string_types, buffer
|
||||
|
||||
|
||||
class Invalid(Exception):
|
||||
|
@ -32,7 +32,7 @@ class TestGuard(unittest.TestCase):
|
||||
controller.new(bob, thread, comment)
|
||||
except Exception as ex:
|
||||
self.assertIsInstance(ex, comments.Denied)
|
||||
self.assertIn("ratelimit exceeded", ex.message)
|
||||
self.assertIn("ratelimit exceeded", ex.args[0])
|
||||
else:
|
||||
self.assertTrue(False)
|
||||
|
||||
@ -63,7 +63,7 @@ class TestGuard(unittest.TestCase):
|
||||
controller.new(bob, thread, comment)
|
||||
except Exception as ex:
|
||||
self.assertIsInstance(ex, comments.Denied)
|
||||
self.assertIn("direct response", ex.message)
|
||||
self.assertIn("direct response", ex.args[0])
|
||||
else:
|
||||
self.assertTrue(False)
|
||||
|
||||
@ -79,7 +79,7 @@ class TestGuard(unittest.TestCase):
|
||||
controller.new(bob, thread, dict(text="...", parent=ref))
|
||||
except Exception as ex:
|
||||
self.assertIsInstance(ex, comments.Denied)
|
||||
self.assertIn("editing frame is still open", ex.message)
|
||||
self.assertIn("editing frame is still open", ex.args[0])
|
||||
else:
|
||||
self.assertTrue(False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user