def join(self, roomJID, nick, historyOptions=None,
                   password=None):
        def cb(presence):
            """
            We have presence that says we joined a room.
            """
            if STATUS_CODE.ROOM_CREATED in presence.mucStatuses:
                room.locked = True

            return room

        def eb(failure):
            self._removeRoom(roomJID)
            return failure

        room = Room(roomJID, nick)
        self._addRoom(room)

        d = MUCClientProtocol.join(self, roomJID, nick, historyOptions,
                                         password)
        d.addCallbacks(cb, eb)
        return d
Fake urlopen using test client
dataset/ETHPy150Open ralphm/wokkel/wokkel/muc.py/MUCClient.join--crossover with--dataset/ETHPy150Open Fantomas42/django-blog-zinnia/zinnia/tests/test_ping.py/ExternalUrlsPingerTestCase.fake_urlopen