summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAdrian Tschira <nota@notafile.com>2018-04-15 17:20:37 +0200
committerAdrian Tschira <nota@notafile.com>2018-04-15 20:32:42 +0200
commit1515560f5ce8054a539dd0fed9e88232883f079f (patch)
tree31df1feed0768aa41f0da3ea0f23ea107ce1dda5 /tests
parentMerge branch 'master' of https://github.com/matrix-org/synapse into develop (diff)
downloadsynapse-1515560f5ce8054a539dd0fed9e88232883f079f.tar.xz
Use str(e) instead of e.message
Doing this I learned e.message was pretty shortlived, added in 2.6,
they realized it was a bad idea and deprecated it in 2.7

Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/storage/test_appservice.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/storage/test_appservice.py b/tests/storage/test_appservice.py
index c2e39a7288..00825498b1 100644
--- a/tests/storage/test_appservice.py
+++ b/tests/storage/test_appservice.py
@@ -480,9 +480,9 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
             ApplicationServiceStore(None, hs)
 
         e = cm.exception
-        self.assertIn(f1, e.message)
-        self.assertIn(f2, e.message)
-        self.assertIn("id", e.message)
+        self.assertIn(f1, str(e))
+        self.assertIn(f2, str(e))
+        self.assertIn("id", str(e))
 
     @defer.inlineCallbacks
     def test_duplicate_as_tokens(self):
@@ -504,6 +504,6 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
             ApplicationServiceStore(None, hs)
 
         e = cm.exception
-        self.assertIn(f1, e.message)
-        self.assertIn(f2, e.message)
-        self.assertIn("as_token", e.message)
+        self.assertIn(f1, str(e))
+        self.assertIn(f2, str(e))
+        self.assertIn("as_token", str(e))