Пример #1
0
    def test_not_implemented(self):
        with pytest.raises(NotImplementedError):
            IRouter(None, None)

        def init(self, conf, router_conf):
            pass
        IRouter.__init__ = init
        ir = IRouter(None, None)
        with pytest.raises(NotImplementedError):
            ir.register("uaid", {}, "")
        with pytest.raises(NotImplementedError):
            ir.route_notification("uaid", {})
        with pytest.raises(NotImplementedError):
            ir.amend_endpoint_response({}, {})
Пример #2
0
    def test_not_implemented(self):
        self.assertRaises(NotImplementedError, IRouter, None, None)

        def init(self, settings, router_conf):
            pass
        IRouter.__init__ = init
        ir = IRouter(None, None)
        self.assertRaises(NotImplementedError, ir.register, "uaid", {})
        self.assertRaises(NotImplementedError, ir.route_notification, "uaid",
                          {})
        self.assertRaises(NotImplementedError, ir.amend_msg, {})
Пример #3
0
    def test_not_implemented(self):
        assert_raises(NotImplementedError, IRouter, None, None)

        def init(self, settings, router_conf):
            pass

        IRouter.__init__ = init
        ir = IRouter(None, None)
        assert_raises(NotImplementedError, ir.register, "uaid", {}, "")
        assert_raises(NotImplementedError, ir.route_notification, "uaid", {})
        assert_raises(NotImplementedError, ir.amend_endpoint_response, {}, {})