Module Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Dict For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Str orelse Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Dict Str NameLoad For NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Assign NameStore Call NameLoad NameLoad Str Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Dict Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A N/A glob N/A os django.test TestCase django.contrib.auth.models User onadata.apps.logger.models XForm Instance onadata.apps.main.models UserProfile open_all_files N/A N/A path N/A N/A N/A file_paths N/A N/A glob glob N/A N/A N/A os path join path * N/A result N/A N/A file_path file_paths N/A N/A N/A N/A file_path endswith .jpg N/A N/A N/A result N/A file_path N/A open file_path rb N/A N/A N/A result N/A file_path N/A open file_path N/A result N/A create_post_data N/A N/A path N/A N/A N/A xml_files N/A N/A glob glob N/A N/A N/A os path join path *.xml N/A N/A N/A len xml_files 1 N/A N/A N/A Exception There should be a single XML file in this directory. N/A xml_file N/A open N/A xml_files N/A 0 N/A post_data N/A xml_submission_file xml_file N/A jpg N/A N/A glob glob N/A N/A N/A os path join path *.jpg N/A N/A image_file N/A open jpg rb N/A N/A post_data N/A jpg image_file N/A post_data N/A get_absolute_path N/A N/A subdirectory N/A N/A N/A N/A N/A N/A os path join N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ subdirectory N/A TestInstanceCreation N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self user N/A N/A N/A User objects create username bob N/A N/A profile c N/A N/A N/A UserProfile objects get_or_create user N/A self user N/A N/A profile require_auth False N/A N/A N/A profile save N/A absolute_path N/A get_absolute_path forms N/A open_forms N/A open_all_files absolute_path N/A N/A self json {"default_language": "default", "id_string": "Water_2011_03_17", "children": [], "name": "Water_2011_03_17", "title": "Water_2011_03_17", "type": "survey"} N/A N/A path open_file N/A N/A open_forms items N/A N/A N/A N/A N/A XForm objects create xml N/A N/A open_file read user N/A self user json N/A self json require_auth False N/A N/A N/A open_file close N/A N/A N/A self _create_water_translated_form N/A _create_water_translated_form N/A N/A self N/A N/A N/A f N/A open N/A N/A N/A os path join N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ Water_Translated_2011_03_10.xml N/A xml N/A N/A f read N/A N/A N/A f close N/A N/A self xform N/A N/A N/A XForm objects create xml xml user N/A self user json N/A self json N/A test_form_submission N/A N/A self N/A N/A N/A f N/A open N/A N/A N/A os path join N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ Water_Translated_2011_03_10_2011-03-10_14-38-28.xml N/A xml N/A N/A f read N/A N/A N/A f close N/A N/A N/A N/A Instance objects create xml xml user N/A self user xform N/A self xform N/A test_data_submission N/A N/A self N/A N/A N/A subdirectories N/A Water_2011_03_17_2011-03-17_16-29-59 N/A subdirectory subdirectories N/A N/A path N/A get_absolute_path subdirectory N/A postdata N/A create_post_data path N/A response N/A N/A N/A self client post /bob/submission postdata N/A N/A N/A self failUnlessEqual N/A response status_code 201 N/A test_submission_for_missing_form N/A N/A self N/A N/A N/A xml_file N/A open N/A N/A N/A os path join N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ Health_2011_03_13_invalid_id_string.xml N/A postdata N/A xml_submission_file xml_file N/A response N/A N/A N/A self client post /bob/submission postdata N/A N/A N/A self failUnlessEqual N/A response status_code 404 N/A N/A