Package turbogears :: Package widgets :: Package tests :: Module test_widgets
[hide private]

Module test_widgets

source code

Classes [hide private]
  Request
  TestParams
  TestSchemaValidation
Tests the validation of a CompoundWidget is done correctly with a Schema validator and no validators on the child widgets.
  TestSchemaValidationWithChildWidgetsValidators
Tests the validation of a CompoundWidget is done correctly with a Schema validator and independent validators on the each of the child widgets.
Functions [hide private]
 
setup_module() source code
 
teardown_module() source code
 
test_rendering_without_engine()
Helpful error when rendering widgets with no templating engine loaded
source code
 
test_label()
Tests simple labels
source code
 
test_default_value()
Widgets can have a default value
source code
 
test_labeltext()
Label text defaults to the capitalized name
source code
 
test_validation()
Values can be converted to/from Python values
source code
 
test_unicode_input()
Unicode values are rendered correctly
source code
 
test_widget_css()
Widgets can require CSS resources
source code
 
test_widget_js()
Widgets can require JavaScript resources
source code
 
test_widget_url()
It might be needed to insert an URL somewhere
source code
 
test_submit() source code
 
test_threadsafety()
Widget attributes can't be changed after init, for threadsafety
source code
 
test_checkbox()
A CheckBox has not a value and is not checked by default
source code
 
test_field_class()
The class of a field corresponds to the name of its Python class
source code
 
test_field_id()
The id of a field corresponds to the name of the field
source code
 
test_selection_field()
A selection field presents a list of options that can be changed dynamically.
source code
 
test_callable_options()
Widgets support callable options passed to the constructor or dynamically
source code
 
test_template_overridal()
Tests that we can override an instances template at construction time and get it automatically compiled.
source code
 
test_simple_widget_attrs()
A simple widget supports attributes passed to the constructor or at display time.
source code
 
test_textfield() source code
 
test_textarea() source code
 
test_render_field_for()
Using the render_field_for method of a FormFieldsContainer we can render the widget instance associated to a particular field name.
source code
 
test_css_classes()
A FormField supports css_classes, they are added after the original class.
source code
 
test_ticket272()
TextFields with a "name" attribute = "title" should be OK.
source code
 
test_param_descriptor() source code
 
test_param_descriptor_mutable_class_attrs() source code
 
test_param_descriptor_properties() source code
 
test_dict_as_validator() source code
 
test_params_doc()
Tests params_doc are picked from all bases giving priority to the widget's own.
source code
 
test_selectfield_with_with_non_iterable_option_elements() source code
Variables [hide private]
  oldrequest = None
Function Details [hide private]

test_selection_field()

source code 

A selection field presents a list of options that can be changed dynamically. One or more options can be selected/checked by default or dynamically.

test_css_classes()

source code 

A FormField supports css_classes, they are added after the original class. They can be provided at construction or at display time, the latter overrides the former but attrs overrides everything.