Module Import alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body If CompareIn Str Call AttributeLoad NameLoad attr BinOpMod Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Return decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str If CompareIn Str Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str If CompareIn Str Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str If CompareIn Str Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Str Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad If UnaryOpNot Call NameLoad Call AttributeLoad Call NameLoad attr AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr keyword Str keyword Str keyword Num keyword Num keyword Str keyword Num keyword Num keyword Num keyword Str Return decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return decorator_list If CompareEq NameLoad Str body Expr Call NameLoad NameLoad
N/A N/A wsgi_intercept.webtest_intercept applications.sahana.modules.s3_test WSGI_Test CR_Test N/A WSGI_Test N/A N/A Extended version of WSGI_Test for Shelter Registry.
    Designed to be run from Web2Py shell
    Copy to modules folder & run as:
        from applications.sahana.modules.test_cr import *
        test_cr(db)
    NB This doesn't yet work: NameError: global name 'create_fn' is not defined N/A module cr __init__ N/A N/A self db N/A N/A N/A N/A N/A WSGI_Test __init__ self db N/A N/A setUp N/A N/A self db N/A N/A N/A Populate Shelter Registry with Test Data to make each test case separable
        Intercept WSGI calls to do in-process testing
         N/A N/A N/A wsgi_intercept add_wsgi_intercept N/A self HOST N/A self PORT create_fn N/A N/A runTest N/A N/A self db N/A N/A N/A Unit Test all functions within Shelter Registry N/A N/A N/A self runTestLogin N/A N/A N/A self runTestShelter N/A N/A runTestLogin N/A N/A self N/A N/A N/A N/A 200 OK N/A N/A test getPage N/A /sahana/%s/login module N/A N/A N/A N/A test assertHeader Content-Type text/html N/A N/A N/A test assertInBody Login N/A N/A runTestShelter N/A N/A self N/A N/A N/A resource shelter N/A N/A 200 OK N/A N/A test getPage N/A /sahana/%s/%s N/A module resource N/A N/A N/A N/A test assertHeader Content-Type text/html N/A N/A N/A test assertInBody List Shelters N/A N/A 200 OK N/A N/A test getPage N/A /sahana/%s/%s?format=json N/A module resource N/A N/A N/A N/A test assertHeader Content-Type text/html N/A N/A N/A test assertInBody [ N/A N/A 200 OK N/A N/A test getPage N/A /sahana/%s/%s?format=csv N/A module resource N/A N/A N/A N/A test assertHeader Content-Type text/csv N/A N/A setUpShelter N/A N/A self db N/A N/A N/A Create test Data for Shelter Registry N/A resource shelter N/A table N/A N/A module _ resource N/A N/A N/A len N/A N/A N/A db select N/A N/A db N/A table ALL N/A N/A N/A N/A N/A db N/A table insert name Test Shelter description Just a test location_id 1 person_id 1 address 52 Test Street capacity 100 dwellings 10 persons_per_dwelling 10 area 1 sq km N/A N/A N/A test_cr N/A N/A db N/A N/A N/A test N/A CR_Test db N/A N/A N/A test setUp db N/A N/A N/A test runTest db N/A N/A N/A N/A __name__ __main__ N/A N/A N/A test_cr db