from unittest.mock import MagicMock
from jupyterlab_autoversion.extension import load_jupyter_server_extension


class TestExtension:
    def setup(self):
        pass
        # setup() before each test method

    def teardown(self):
        pass
        # teardown() after each test method

    @classmethod
    def setup_class(cls):
        pass
        # setup_class() before any methods in this class

    @classmethod
    def teardown_class(cls):
        pass
        # teardown_class() after any methods in this class

    def test_load_jupyter_server_extension(self):

        m = MagicMock()

        m.web_app.settings = {}
        m.web_app.settings["base_url"] = "/test"
        m.config = {"JupyterLabAutoversion": {"backend": "git"}}
        load_jupyter_server_extension(m)
