diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-13 17:43:10 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-13 18:03:41 +0100 |
commit | 7fb93f2a47ab8abc44a9b6a94171950a40f6ba33 (patch) | |
tree | b82af6bb6e2432a38e989ba2bdf44c213f75d2cb /tests | |
parent | Update graph.py to use new federation urls (diff) | |
download | synapse-7fb93f2a47ab8abc44a9b6a94171950a40f6ba33.tar.xz |
Add a HomeServer.parse_roomalias() to avoid having to RoomAlias.from_sring(..., hs=hs) - similar to parse_userid()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_types.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_types.py b/tests/test_types.py index 522d52363d..d2ccbcfa55 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -62,3 +62,9 @@ class RoomAliasTestCase(unittest.TestCase): room = RoomAlias("channel", "my.domain", True) self.assertEquals(room.to_string(), "#channel:my.domain") + + def test_via_homeserver(self): + room = mock_homeserver.parse_roomalias("#elsewhere:my.domain") + + self.assertEquals("elsewhere", room.localpart) + self.assertEquals("my.domain", room.domain) |