Module Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareGt NameLoad Num body ImportFrom alias Expr Str ClassDef bases body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Call AttributeLoad NameLoad attr orelse Return NameLoad orelse If BoolOpAnd AttributeLoad NameLoad attr NameLoad body Return Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad While BoolOpAnd NameLoad UnaryOpNot NameLoad body If Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad orelse If BoolOpAnd UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareEq NameLoad Str body If Call NameLoad NameLoad NameLoad body If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore BoolOpOr NameLoad UnaryOpNot NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Break orelse If CompareEq NameLoad Str body If Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Break Raise Call NameLoad Str decorator_list NameLoad decorator_list
N/A N/A os N/A sys N/A parsing parsing * N/A PYTHON_MAJOR_VERSION N/A N/A sys version_info N/A 0 N/A N/A PYTHON_MAJOR_VERSION 2 N/A past.builtins basestring N/A 
Encapsulates contend handling logic, for pulling file content into tests
 ContentHandler N/A N/A N/A  Handles content that may be (lazily) read from filesystem and/or templated to various degrees
    Also creates pixie dust and unicorn farts on demand
    This is pulled out because logic gets complex rather fast

    Covers 6 states:
        - Inline body content, no templating
        - Inline body content, with templating
        - File path to content, NO templating
        - File path to content, content gets templated
        - Templated path to file content (path itself is templated), file content UNtemplated
        - Templated path to file content (path itself is templated), file content TEMPLATED
     N/A content None N/A is_file False N/A is_template_path False N/A is_template_content False is_dynamic N/A N/A self N/A N/A N/A  Is templating used?  N/A N/A N/A self is_template_path N/A self is_template_content N/A get_content N/A N/A self context N/A None N/A N/A  Does all context binding and pathing to get content, templated out  N/A N/A self is_file N/A N/A path N/A self content N/A N/A N/A self is_template_path context N/A N/A path N/A N/A N/A N/A string Template path safe_substitute N/A N/A context get_values N/A data None N/A N/A open path r f N/A N/A data N/A N/A f read N/A N/A N/A self is_template_content context N/A N/A N/A N/A N/A N/A string Template data safe_substitute N/A N/A context get_values N/A N/A data N/A N/A N/A N/A self is_template_content context N/A N/A N/A safe_substitute_unicode_template N/A self content N/A N/A context get_values N/A N/A N/A self content N/A create_noread_version N/A N/A self N/A N/A N/A  Read file content if it is static and return content handler with no I/O  N/A N/A N/A N/A self is_file N/A self is_template_path N/A N/A self N/A output N/A ContentHandler N/A N/A output is_template_content N/A self is_template_content N/A N/A open N/A self content r f N/A N/A N/A output content N/A N/A f read N/A output N/A setup N/A N/A self input is_file is_template_path is_template_content N/A False False False N/A N/A  Self explanatory, input is inline content or file path.  N/A N/A N/A isinstance input basestring N/A N/A N/A TypeError Input is not a string N/A is_file N/A N/A input N/A N/A N/A os path abspath input N/A N/A self content input N/A N/A self is_file is_file N/A N/A self is_template_path is_template_path N/A N/A self is_template_content is_template_content N/A parse_content N/A N/A node N/A N/A N/A  Parse content from input node and returns ContentHandler object
        it'll look like:

            - template:
                - file:
                    - temple: path

            or something

         N/A output N/A ContentHandler N/A is_template_path False N/A is_template_content False N/A is_file False N/A is_done False N/A N/A node N/A is_done N/A N/A N/A isinstance node basestring N/A N/A N/A output content node N/A N/A N/A output setup node is_file is_file is_template_path is_template_path is_template_content is_template_content N/A output N/A N/A N/A N/A N/A isinstance node dict N/A N/A isinstance node list N/A N/A N/A TypeError Content must be a string, dictionary, or list of dictionaries N/A is_done True N/A flat N/A lowercase_keys N/A flatten_dictionaries node N/A N/A key value N/A N/A flat items N/A N/A N/A key template N/A N/A N/A isinstance value basestring N/A N/A is_file N/A N/A value N/A N/A N/A os path abspath value N/A N/A output content value N/A is_template_content N/A is_template_content N/A is_file N/A N/A output is_template_content is_template_content N/A N/A output is_template_path is_file N/A N/A output is_file is_file N/A output N/A N/A is_template_content True N/A node value N/A is_done False N/A N/A N/A N/A key file N/A N/A N/A isinstance value basestring N/A N/A N/A output content N/A N/A N/A os path abspath value N/A N/A output is_file True N/A N/A output is_template_content is_template_content N/A output N/A N/A is_file True N/A node value N/A is_done False N/A N/A N/A Exception Invalid configuration for content. N/A staticmethod N/A