예제 #1
0
    def test_DictPropertyLoader_try_get_returns_property_from_dict(self):
        k = util.base36_str()
        v = util.base36_str()

        loader = DictPropertyLoader(util.base36_str(), {k: v})

        ret = loader.try_get(k)

        self.assertEqual(v, ret)
예제 #2
0
    def test_DictPropertyLoader_try_get_returns_None_if_property_does_not_exist(
            self):
        loader = DictPropertyLoader(util.base36_str(), {})

        self.assertIsNone(loader.try_get(util.base36_str()))