def test_open_context(self):
     context = Context()
     context.attributes = ()
     context.class_vars = ()
     self.handler.new_context = Mock(return_value=context)
     self.handler.open_context(self.widget, self.domain)
     self.handler.new_context.assert_called_with(*self.args)
Ejemplo n.º 2
0
 def test_open_context(self):
     context = Context()
     context.attributes = ()
     context.class_vars = ()
     self.handler.new_context = Mock(return_value=context)
     self.handler.open_context(self.widget, self.domain)
     self.handler.new_context.assert_called_with(*self.args)
 def _create_context(self, attrs, class_vars, metas):
     context = Context()
     context.attributes = attrs
     context.class_vars = class_vars
     context.metas = metas
     return context
Ejemplo n.º 4
0
 def _create_context(self, attrs, class_vars, metas):
     context = Context()
     context.attributes = attrs
     context.class_vars = class_vars
     context.metas = metas
     return context