예제 #1
0
    def test_labextension_disable(self):
        self.test_labextension_enable()
        disable_labextension(self.name)

        data = _read_config_data('labextensions', user=True)
        config = data.get(self.name, {})
        assert not config['enabled']
        assert 'python_module' not in config
예제 #2
0
    def test_labextension_disable(self):
        self.test_labextension_enable()
        disable_labextension(self.name)

        data = _read_config_data(user=True)
        config = data.get('LabApp', {}).get('labextensions', {}).get(self.name, {})
        assert not config['enabled']
        assert 'python_module' not in config
예제 #3
0
 def test_labextensionpy_disable(self):
     self._inject_mock_extension()
     install_labextension_python('mockextension', user=True)
     enable_labextension_python('mockextension')
     disable_labextension_python('mockextension', user=True)
     
     data = _read_config_data(user=True)
     config = data.get('LabApp', {}).get('labextensions', {}).get('mockextension', {})
     assert not config['enabled']
예제 #4
0
 def test_labextensionpy_disable(self):
     self._inject_mock_extension()
     install_labextension_python('mockextension', user=True)
     enable_labextension_python('mockextension')
     disable_labextension_python('mockextension', user=True)
     
     data = _read_config_data('labextensions', user=True)
     config = data.get('mockextension', {})
     assert not config['enabled']
예제 #5
0
 def test_labextensionpy_enable(self):
     self._inject_mock_extension()
     install_labextension_python('mockextension', user=True)
     enable_labextension_python('mockextension')
     
     data = _read_config_data('labextensions', user=True)
     config = data.get('mockextension', False)
     assert config['enabled'] == True
     assert config['python_module'] == 'mockextension'
예제 #6
0
 def test_labextensionpy_enable(self):
     self._inject_mock_extension()
     install_labextension_python('mockextension', user=True)
     enable_labextension_python('mockextension')
     
     data = _read_config_data('labextensions', user=True)
     config = data.get('mockextension', False)
     assert config['enabled'] == True
     assert config['python_module'] == 'mockextension'
예제 #7
0
    def test_labextension_enable(self):
        with TemporaryDirectory() as d:
            f = u'ƒ.js'
            src = pjoin(d, f)
            touch(src)
            install_labextension(src, self.name, user=True)
            enable_labextension(self.name)

        data = _read_config_data(user=True)
        config = data.get('LabApp', {}).get('labextensions', {}).get(self.name, {})
        assert config['enabled'] == True
        assert 'python_module' not in config
예제 #8
0
    def test_labextension_enable(self):
        with TemporaryDirectory() as d:
            f = u'ƒ.js'
            src = pjoin(d, f)
            touch(src)
            install_labextension(src, self.name, user=True)
            enable_labextension(self.name)

        data = _read_config_data('labextensions', user=True)
        config = data.get(self.name, {})
        assert config['enabled']
        assert 'python_module' not in config