Exemple #1
0
    def test_DictPropertyLoader_get_returns_property_from_dict(self):
        k = util.base36_str()
        v = util.base36_str()

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

        ret = loader.get(k)

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

        with self.assertRaises(KeyError):
            loader.get(util.base36_str())