diff --git a/test/property/test_property_filter.py b/test/property/test_property_filter.py index 66eff3b..8553552 100644 --- a/test/property/test_property_filter.py +++ b/test/property/test_property_filter.py @@ -11,7 +11,7 @@ class PropertyFilterTest(TestCase): pf = PropertyFilter(pm, "testkey") self.assertEqual(pf["testkey"], "testvalue") - def testMissesPropert(self): + def testMissesProperty(self): pm = PropertyLayer() pm["testkey"] = "testvalue" pf = PropertyFilter(pm, "other_key") @@ -49,3 +49,11 @@ class PropertyFilterTest(TestCase): pf["testkey"] = "new value" self.assertEqual(pm["testkey"], "new value") self.assertEqual(pf["testkey"], "new value") + + def testRejectsWrite(self): + pm = PropertyLayer() + pm["testkey"] = "old value" + pf = PropertyFilter(pm, "otherkey") + with self.assertRaises(KeyError): + pf["testkey"] = "new value" + self.assertEqual(pm["testkey"], "old value")