bokeh.client.connection.ClientConnection

Here are the examples of the python api bokeh.client.connection.ClientConnection taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

3 View Source File : test_connection.py
License : MIT License
Project Creator : rthorst

    def test_creation(self):
        c = bcc.ClientConnection("session", "wsurl")
        assert c.url == "wsurl"
        assert c.connected == False
        assert isinstance(c.io_loop, IOLoop)

        assert c._session == "session"
        assert isinstance(c._state, NOT_YET_CONNECTED)
        assert c._until_predicate is None
        assert c._server_info is None
        assert c._arguments is None

    def test_creation_with_arguments(self):

3 View Source File : test_connection.py
License : MIT License
Project Creator : rthorst

    def test_creation_with_arguments(self):
        c = bcc.ClientConnection("session", "wsurl", arguments=dict(foo="bar"))
        assert c.url == "wsurl"
        assert c.connected == False
        assert isinstance(c.io_loop, IOLoop)

        assert c._session == "session"
        assert isinstance(c._state, NOT_YET_CONNECTED)
        assert c._until_predicate is None
        assert c._server_info is None
        assert c._arguments == dict(foo="bar")

    def test__versioned_url(self):

3 View Source File : test_connection.py
License : MIT License
Project Creator : rthorst

    def test__versioned_url_with_arguments(self):
        c = bcc.ClientConnection(FakeSess(), "wsurl", arguments=dict(foo="bar"))
        assert c._versioned_url() == "wsurl?bokeh-protocol-version=1.0&bokeh-session-id=session_id&foo=bar"

#-----------------------------------------------------------------------------
# Private API
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Code
#-----------------------------------------------------------------------------

0 View Source File : test_connection.py
License : MIT License
Project Creator : rthorst

    def test__versioned_url(self):
        c = bcc.ClientConnection(FakeSess(), "wsurl")
        assert c._versioned_url() == "wsurl?bokeh-protocol-version=1.0&bokeh-session-id=session_id"

    def test__versioned_url_with_arguments(self):