From 7fb93f2a47ab8abc44a9b6a94171950a40f6ba33 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Wed, 13 Aug 2014 17:43:10 +0100 Subject: Add a HomeServer.parse_roomalias() to avoid having to RoomAlias.from_sring(..., hs=hs) - similar to parse_userid() --- tests/test_types.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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) -- cgit 1.5.1