--- a/devtools/fake.py Mon Aug 03 09:37:13 2009 +0200
+++ b/devtools/fake.py Mon Aug 03 10:50:57 2009 +0200
@@ -35,26 +35,21 @@
def sources(self):
return {}
-class FakeVReg(object):
+class FakeVReg(dict):
def __init__(self, schema=None, config=None):
self.schema = schema
self.config = config or FakeConfig()
self.properties = {'ui.encoding': 'UTF8',
'ui.language': 'en',
}
+ self.update({
+ 'controllers' : {'login': []},
+ 'views' : {},
+ })
def property_value(self, key):
return self.properties[key]
- _registries = {
- 'controllers' : [Mock(id='view'), Mock(id='login'),
- Mock(id='logout'), Mock(id='edit')],
- 'views' : [Mock(id='primary'), Mock(id='oneline'), Mock(id='list')],
- }
-
- def registry_objects(self, name, oid=None):
- return self._registries[name]
-
def etype_class(self, etype):
class Entity(dict):
e_schema = self.schema[etype]