#NEWLINE# def test_datasource_complete_resource_description( self ) : #NEWLINE# #INDENT# cli_output = '{\n            "outcome" => "success",\n            "result" => {\n                "description" => "A JDBC data-source configuration",\n                "head-comment-allowed" => true,\n                "tail-comment-allowed" => true,\n                "attributes" => {\n                    "connection-url" => {\n                        "type" => STRING,\n                        "description" => "The JDBC driver connection URL",\n                        "expressions-allowed" => true,\n                        "nillable" => false,\n                        "min-length" => 1L,\n                        "max-length" => 2147483647L,\n                        "access-type" => "read-write",\n                        "storage" => "configuration",\n                        "restart-required" => "no-services"\n                    }\n                },\n                "children" => {"connection-properties" => {"description" => "The connection-properties element allows you to pass in arbitrary connection properties to the Driver.connect(url, props) method"}}\n            }\n        }\n        ' #NEWLINE# result = jboss7_cli . _parse ( cli_output ) #NEWLINE# self . assertEqual ( result [ 'outcome' ] , 'success' ) #NEWLINE# conn_url_attributes = result [ 'result' ] [ 'attributes' ] [ 'connection-url' ] #NEWLINE# self . assertEqual ( conn_url_attributes [ 'type' ] , 'STRING' ) #NEWLINE# self . assertEqual ( conn_url_attributes [ 'description' ] , 'The JDBC driver connection URL' ) #NEWLINE# self . assertTrue ( conn_url_attributes [ 'expressions-allowed' ] ) #NEWLINE# self . assertFalse ( conn_url_attributes [ 'nillable' ] ) #NEWLINE# self . assertEqual ( conn_url_attributes [ 'min-length' ] , 1 ) #NEWLINE# self . assertEqual ( conn_url_attributes [ 'max-length' ] , 2147483647 ) #NEWLINE# self . assertEqual ( conn_url_attributes [ 'access-type' ] , 'read-write' ) #NEWLINE# self . assertEqual ( conn_url_attributes [ 'storage' ] , 'configuration' ) #NEWLINE# self . assertEqual ( conn_url_attributes [ 'restart-required' ] , 'no-services' )