Merge branch 'master' into metaconfig
[tiramisu.git] / test / test_state.py
index 3188d3b..e7777f1 100644 (file)
@@ -318,3 +318,46 @@ def test_state_groupconfig():
         delete_session('29090937')
     except ConfigError:
         pass
+
+
+def test_state_unkown_setting_owner():
+    """load an unknow _owner, should create it"""
+    assert not 'supernewuser' in owners.__dict__
+    loads("""ccopy_reg
+_reconstructor
+p0
+(ctiramisu.setting
+Settings
+p1
+c__builtin__
+object
+p2
+Ntp3
+Rp4
+(dp5
+S'_owner'
+p6
+S'supernewuser'
+p7
+sS'_p_'
+p8
+g0
+(ctiramisu.storage.dictionary.setting
+Settings
+p9
+g2
+Ntp10
+Rp11
+(dp12
+S'_cache'
+p13
+(dp14
+sS'_permissives'
+p15
+(dp16
+sS'_properties'
+p17
+(dp18
+sbsb.
+.""")
+    assert 'supernewuser' in owners.__dict__