def _get_case_sensitive(mapr_settings, menu):
    cs = False
    try:
        cs = toBoolean(mapr_settings.CONFIG[menu]['case_sensitive'])
    except KeyError:
        pass
    return cs
Exemple #2
0
def _get_case_sensitive(mapr_settings, menu):
    cs = False
    try:
        cs = toBoolean(mapr_settings.CONFIG[menu]['case_sensitive'])
    except KeyError:
        pass
    return cs
def testInterpolateSetting(gatewaywrapper, interpolate):
    """
    Tests conn.getInterpolateSetting(), setting the value as Admin and
    testing the output as a regular user.
    """
    gatewaywrapper.loginAsAdmin()
    if interpolate is None:
        interpolate = gatewaywrapper.gateway.getConfigService() \
            .getConfigDefaults()['omero.client.viewer.interpolate_pixels']
    try:
        gatewaywrapper.gateway.getConfigService().setConfigValue(
            "omero.client.viewer.interpolate_pixels", interpolate)
        gatewaywrapper.loginAsAuthor()
        inter = gatewaywrapper.gateway.getInterpolateSetting()
        assert inter == toBoolean(interpolate)
    finally:
        gatewaywrapper.loginAsAdmin()
        d = gatewaywrapper.gateway.getConfigService() \
            .getConfigDefaults()['omero.client.viewer.interpolate_pixels']
        gatewaywrapper.gateway.getConfigService().setConfigValue(
            "omero.client.viewer.interpolate_pixels", d)
def testInterpolateSetting(gatewaywrapper, interpolate):
    """
    Tests conn.getInterpolateSetting(), setting the value as Admin and
    testing the output as a regular user.
    """
    gatewaywrapper.loginAsAdmin()
    if interpolate is None:
        interpolate = gatewaywrapper.gateway.getConfigService() \
            .getConfigDefaults()['omero.client.viewer.interpolate_pixels']
    try:
        gatewaywrapper.gateway.getConfigService().setConfigValue(
            "omero.client.viewer.interpolate_pixels", interpolate)
        gatewaywrapper.loginAsAuthor()
        inter = gatewaywrapper.gateway.getInterpolateSetting()
        assert inter == toBoolean(interpolate)
    finally:
        gatewaywrapper.loginAsAdmin()
        d = gatewaywrapper.gateway.getConfigService() \
            .getConfigDefaults()['omero.client.viewer.interpolate_pixels']
        gatewaywrapper.gateway.getConfigService().setConfigValue(
            "omero.client.viewer.interpolate_pixels", d)
 def test_toBoolean_false(self, false_val):
     assert not toBoolean(false_val)
 def test_toBoolean_true(self, true_val):
     assert toBoolean(true_val)
Exemple #7
0
 def test_toBoolean_false(self, false_val):
     assert not toBoolean(false_val)
Exemple #8
0
 def test_toBoolean_true(self, true_val):
     assert toBoolean(true_val)