Exemplo n.º 1
0
    def test_3(self):
        rv = strip_dict({
            "omero.jvmcfg.foo": "a",
            "something.else": "b"})

        assert rv["foo"] == "a"
        assert "something.else" not in rv
Exemplo n.º 2
0
    def test_3(self):
        rv = strip_dict({
            "omero.jvmcfg.foo": "a",
            "something.else": "b"})

        assert rv["foo"] == "a"
        assert "something.else" not in rv
Exemplo n.º 3
0
 def test_4(self, input, output):
     p = write_config(input)
     config = ConfigXml(filename=str(p), env_config="default")
     try:
         m = config.as_map()
         s = strip_dict(m, suffix="blitz")
         assert s == output
     finally:
         config.close()
Exemplo n.º 4
0
 def test_4(self, input, output):
     p = write_config(input)
     config = ConfigXml(filename=str(p), env_config="default")
     try:
         m = config.as_map()
         s = strip_dict(m, suffix="blitz")
         assert s == output
     finally:
         config.close()
Exemplo n.º 5
0
 def test_5(self):
     rv = strip_dict({
         "omero.jvmcfg.a.blitz": "b",
     }, suffix="blitz")
     assert rv["a"] == "b"
Exemplo n.º 6
0
 def test_2(self):
     rv = strip_dict({"a.b.c": "d"}, prefix="a.b")
     assert rv["c"] == "d"
Exemplo n.º 7
0
 def test_1(self):
     rv = strip_dict({"a.b": "c"}, prefix="a")
     assert {"b": "c"} == rv
Exemplo n.º 8
0
 def test_5(self):
     rv = strip_dict({"omero.jvmcfg.a.blitz": "b"}, suffix="blitz")
     assert rv["a"] == "b"
Exemplo n.º 9
0
 def test_2(self):
     rv = strip_dict({"a.b.c": "d"}, prefix="a.b")
     assert rv["c"] == "d"
Exemplo n.º 10
0
 def test_1(self):
     rv = strip_dict({"a.b": "c"}, prefix="a")
     assert {"b": "c"} == rv