Module Expr Str TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias ImportFrom alias alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults vararg body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str With Call AttributeLoad NameLoad attr NameLoad Str keyword ListLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body ImportFrom alias Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Return Call Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword ListLoad Str Str keyword Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Dict Str Str keyword Str keyword Str With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr Str Str Dict Str Str Expr Call AttributeLoad NameLoad attr Str Str keyword Dict Str Str keyword NameLoad keyword Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str keyword Call NameLoad keyword Str keyword NameLoad Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword Str keyword Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str keyword Call NameLoad keyword Str keyword NameLoad Assign NameStore Call NameLoad keyword Str keyword Str keyword Call NameLoad keyword Str keyword Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Unit tests for blogofile plugin module.
 N/A N/A N/A unittest2 unittest N/A N/A N/A ImportError N/A N/A unittest mock MagicMock patch N/A plugin TestGetByName N/A N/A unittest TestCase N/A N/A Unit tests for get_by_name function.
     _call_fut N/A N/A self N/A args N/A N/A Call the fuction under test.
         N/A N/A N/A plugin get_by_name args N/A test_get_by_name N/A N/A self N/A N/A N/A get_by_name returns plugin with matching name
         N/A mock_plugin N/A MagicMock __dist__ N/A config_name foo N/A N/A N/A patch object plugin iter_plugins return_value N/A mock_plugin N/A N/A p N/A N/A self _call_fut foo N/A N/A N/A self assertEqual p mock_plugin N/A N/A TestPluginTools N/A N/A unittest TestCase N/A N/A Unit tests for PluginTools class.
     _get_target_class N/A N/A self N/A N/A plugin PluginTools N/A PluginTools N/A _make_one N/A N/A self N/A args N/A N/A N/A N/A N/A self _get_target_class args N/A test_init_module_attribute N/A N/A self N/A N/A N/A PluginTools instance has module attribute
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ ./foo N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A self assertEqual N/A tools module mock_plugin_module N/A test_init_namespace_attribute N/A N/A self N/A N/A N/A PluginTools instance namespace attr is plugin module config var
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ ./foo N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A self assertEqual N/A tools namespace N/A mock_plugin_module config N/A test_init_template_lookup_attribute N/A N/A self N/A N/A N/A PluginTools template_lookup attr is mako.lookup.TemplateLookup
         mako.lookup TemplateLookup N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ ./foo N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A self assertIsInstance N/A tools template_lookup TemplateLookup N/A test_init_logger_name N/A N/A self N/A N/A N/A PluginTools logger has plugin name
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ ./foo N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A self assertEqual N/A N/A tools logger name N/A N/A blogofile.plugins.{0} format N/A mock_plugin_module __name__ N/A test_template_lookup N/A N/A self N/A N/A N/A _template_lookup calls mako.lookup.TemplateLookup w/ expected args
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ ./foo N/A N/A N/A patch object plugin TemplateLookup mock_TemplateLookup N/A N/A N/A N/A self _make_one mock_plugin_module N/A N/A N/A mock_TemplateLookup assert_called_once_with directories N/A _templates ./site_src/_templates input_encoding utf-8 output_encoding utf-8 encoding_errors replace N/A test_get_src_dir N/A N/A self N/A N/A N/A get_src_dir method returns expected directory name
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ /foo/bar.py N/A tools N/A N/A self _make_one mock_plugin_module N/A src_dir N/A N/A tools get_src_dir N/A N/A N/A self assertEqual src_dir /foo/site_src N/A test_add_template_dir_append N/A N/A self N/A N/A N/A add_template_dir appends to template_lookup.directories by default
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ /foo/bar.py N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A tools add_template_dir baz N/A N/A N/A self assertEqual N/A N/A tools template_lookup directories N/A _templates /foo/site_src/_templates baz N/A test_add_template_dir_prepend N/A N/A self N/A N/A N/A add_template_dir prepends to template_lookup.directories
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ /foo/bar.py N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A tools add_template_dir baz append False N/A N/A N/A self assertEqual N/A N/A tools template_lookup directories N/A baz _templates /foo/site_src/_templates N/A test_materialize_template N/A N/A self N/A N/A N/A materialize_template calls template.materialize_template w/ exp args
         N/A mock_plugin_module N/A MagicMock config N/A name foo __name__ mock_plugin __file__ /foo/bar.py N/A N/A N/A patch object plugin TemplateLookup mock_TL N/A N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A patch object N/A plugin template materialize_template mock_mt N/A N/A N/A N/A tools materialize_template foo.mako bar.html N/A flip flop N/A N/A N/A mock_mt assert_called_once_with foo.mako bar.html attrs N/A flip flop caller mock_plugin_module lookup N/A mock_TL N/A test_initialize_controllers N/A N/A self N/A N/A N/A initialize_controllers calls controller module init function
         N/A mock_controllers_module_init N/A MagicMock name mock_init N/A mock_controller N/A MagicMock name mock_controller mod N/A MagicMock name mock_mod init mock_controllers_module_init N/A mock_plugin_module N/A MagicMock __name__ mock_plugin __file__ /foo/bar.py config N/A MagicMock name mock_config controllers N/A blog mock_controller N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A tools initialize_controllers N/A N/A N/A mock_controllers_module_init assert_called_once_with N/A test_run_controllers N/A N/A self N/A N/A N/A run_controllers calls controller module run function
         N/A mock_controllers_module_run N/A MagicMock name mock_rub N/A mock_controller N/A MagicMock name mock_controller mod N/A MagicMock name mock_mod run mock_controllers_module_run N/A mock_plugin_module N/A MagicMock __name__ mock_plugin __file__ /foo/bar.py config N/A MagicMock name mock_config controllers N/A blog mock_controller N/A tools N/A N/A self _make_one mock_plugin_module N/A N/A N/A tools run_controllers N/A N/A N/A mock_controllers_module_run assert_called_once_with N/A N/A