summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-05 13:22:20 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-05 13:22:20 +0000
commit131e0364022735ab63d749c158e6875b7b11700e (patch)
tree5001f547190aa13f2290f906a177707e3b2e1694 /tests
parentGlue AS work to general event notifications. Add more exception handling when... (diff)
downloadsynapse-131e0364022735ab63d749c158e6875b7b11700e.tar.xz
Fix unit tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_appservice.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/handlers/test_appservice.py b/tests/handlers/test_appservice.py
index fd6bcbbce6..e16e511587 100644
--- a/tests/handlers/test_appservice.py
+++ b/tests/handlers/test_appservice.py
@@ -60,7 +60,10 @@ class AppServiceHandlerTestCase(unittest.TestCase):
 
     @defer.inlineCallbacks
     def test_query_room_alias_exists(self):
-        room_alias = "#foo:bar"
+        room_alias_str = "#foo:bar"
+        room_alias = Mock()
+        room_alias.to_string = Mock(return_value=room_alias_str)
+
         room_id = "!alpha:bet"
         servers = ["aperture"]
         interested_service = self._mkservice(is_interested=True)
@@ -79,7 +82,7 @@ class AppServiceHandlerTestCase(unittest.TestCase):
 
         self.mock_as_api.query_alias.assert_called_once_with(
             interested_service,
-            room_alias
+            room_alias_str
         )
         self.assertEquals(result.room_id, room_id)
         self.assertEquals(result.servers, servers)