I am testing a widget the following way:

paramsForMyWidget = dict(param1=value1, param2=value2)
widgetObject = widgetClass() # widget class instance
widgetOutput = widgetObject.render(**paramsForMyWidget)

assert len(widgetoutput) > 0, "test that some output is generated"


Now the widget uses global variable session (that is instantiated from
a controller, let's say, the root controller).

I tried using turbogears.testutil.create_request("/") to instantiate
this global variable before the test above, but still the test
failed.

Is there a way of instantiating global session variables from a unit
test?

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to