mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
ProfileStorage: test invalid type change
... for a type that doesn't have special handling in __setitem__()
This commit is contained in:
parent
c5f301f976
commit
eb3550c1b4
1 changed files with 6 additions and 0 deletions
|
@ -122,6 +122,12 @@ class TestSetInvalid(AATest):
|
|||
with self.assertRaises(expected):
|
||||
self.storage[params[0]] = params[1]
|
||||
|
||||
def testInvalidTypeChange(self):
|
||||
storage = ProfileStorage('/test/foo', 'hat', 'TEST')
|
||||
storage.data['invalid'] = 42 # manually set behind __setitem__'s back to avoid checks
|
||||
with self.assertRaises(AppArmorBug):
|
||||
storage['invalid'] = 'foo' # attempt to change type from int to str
|
||||
|
||||
|
||||
class AaTest_repr(AATest):
|
||||
def testRepr(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue