def __init__(self): self.dummyUser = { 'id': '', 'username': u'*****@*****.**', 'password': VALID_PASSWORD1, 'old_password': '', 'salt': VALID_SALT1, 'role': u'receiver', 'state': u'enabled', 'name': u'Generic User', 'description': u'King MockDummy', 'last_login': u'1970-01-01 00:00:00.000000', 'language': u'en', 'password_change_needed': False, 'password_change_date': u'1970-01-01 00:00:00.000000', 'pgp_key_fingerprint': u'', 'pgp_key_public': u'', 'pgp_key_expiration': u'1970-01-01 00:00:00.000000', 'pgp_key_remove': False, 'can_edit_general_settings': False, 'notification': True } self.dummyReceiver = copy.deepcopy(self.dummyUser) self.dummyReceiver = sum_dicts(self.dummyReceiver, { 'can_delete_submission': True, 'can_postpone_expiration': True, 'contexts': [], 'configuration': 'default' }) self.dummyContext = { 'id': '', 'name': u'Already localized name', 'description': u'Already localized desc', 'recipients_clarification': u'', 'presentation_order': 0, 'receivers': [], 'questionnaire_id': u'default', 'additional_questionnaire_id': '', 'select_all_receivers': True, 'tip_timetolive': 20, 'maximum_selectable_receivers': 0, 'show_small_receiver_cards': False, 'show_context': True, 'show_recipients_details': True, 'allow_recipients_selection': False, 'enable_comments': True, 'enable_messages': True, 'enable_two_way_comments': True, 'enable_two_way_messages': True, 'enable_attachments': True, 'enable_rc_to_wb_files': True, 'show_receivers_in_alphabetical_order': False, 'status_page_message': '' } self.dummySubmission = { 'context_id': '', 'answers': {}, 'receivers': [], 'files': [] } self.dummyNode = { 'name': u'Please, set me: name/title', 'description': u'Pleæs€, set m€: d€scription', 'presentation': u'This is whæt æpp€ærs on top', 'footer': u'check it out https://www.youtube.com/franksentus ;)', 'enable_disclaimer': False, 'disclaimer_title': u'', 'disclaimer_text': u'', 'whistleblowing_question': u'', 'whistleblowing_button': u'', 'hostname': u'www.globaleaks.org', 'onionservice': u'', 'rootdomain': u'antani.gov', 'tb_download_link': u'https://www.torproject.org/download/download', 'email': u'*****@*****.**', 'languages_supported': [], # ignored 'languages_enabled': ['it', 'en'], 'latest_version': __version__, 'receipt_salt': '<<the Lannisters send their regards>>', 'maximum_filesize': 30, 'https_admin': True, 'https_custodian': True, 'https_whistleblower': True, 'https_receiver': True, 'can_postpone_expiration': False, 'can_delete_submission': False, 'can_grant_permissions': False, 'ahmia': False, 'allow_indexing': False, 'allow_unencrypted': True, 'allow_iframes_inclusion': False, 'custom_homepage': False, 'disable_submissions': False, 'disable_privacy_badge': False, 'disable_key_code_hint': False, 'disable_donation_panel': False, 'timezone': 0, 'default_language': u'en', 'default_password': u'globaleaks', 'default_questionnaire': u'default', 'admin_language': u'en', 'multisite_login': False, 'simplified_login': False, 'enable_experimental_features': False, 'enable_signup': True, 'mode': u'default', 'signup_tos1_enable': False, 'signup_tos1_title': u'', 'signup_tos1_text': u'', 'signup_tos1_checkbox_label': u'', 'signup_tos2_enable': False, 'signup_tos2_title': u'', 'signup_tos2_text': u'', 'signup_tos2_checkbox_label': u'', 'enable_custom_privacy_badge': False, 'custom_privacy_badge_text': u'', 'header_title_homepage': u'', 'header_title_submissionpage': u'', 'header_title_receiptpage': u'', 'header_title_tippage': u'', 'landing_page': u'homepage', 'context_selector_type': u'list', 'contexts_clarification': u'', 'show_contexts_in_alphabetical_order': False, 'show_small_context_cards': False, 'widget_comments_title': '', 'widget_messages_title': '', 'widget_files_title': '', 'threshold_free_disk_megabytes_high': 200, 'threshold_free_disk_megabytes_low': 1000, 'threshold_free_disk_percentage_high': 3, 'threshold_free_disk_percentage_low': 10, 'password_change_period': 90, 'wbtip_timetolive': 90, 'basic_auth': False, 'basic_auth_username': '', 'basic_auth_password': '', 'reachable_via_web': False, 'anonymize_outgoing_connections': False, 'enable_admin_exception_notification': True, 'enable_developers_exception_notification': True, 'ip_filter_admin': u'', 'ip_filter_admin_enable': False, 'ip_filter_custodian': u'', 'ip_filter_custodian_enable': False, 'ip_filter_receiver': u'', 'ip_filter_receiver_enable': False, 'ip_filter_whistleblower': u'', 'ip_filter_whistleblower_enable': False, 'counter_submissions': 0, 'enable_password_reset': True, 'enable_user_pgp_key_upload': False, 'log_level': 'DEBUG', 'log_accesses_of_internal_users': False, 'encryption': False, 'two_factor_auth': False, 'multisite': False, 'adminonly': False, 'backup': False, 'backup_d': 3, 'backup_w': 3, 'backup_m': 3, 'backup_remote': False, 'backup_remote_server': u'', 'backup_remote_port': 22, 'backup_remote_username': u'', 'backup_remote_password': u'', 'basic_auth': False, 'basic_auth_username': u'', 'basic_auth_password': u'' }
def get_dummy_receiver(self, username): new_u = self.get_dummy_user('receiver', username) new_r = dict(MockDict().dummyReceiver) return sum_dicts(new_r, new_u)
def get_dummy_receiver(self, descpattern): new_u = self.get_dummy_user('receiver', descpattern) new_r = dict(MockDict().dummyReceiver) return sum_dicts(new_r, new_u)
def __init__(self): self.dummyUser = { 'id': '', 'username': u'*****@*****.**', 'password': VALID_PASSWORD1, 'old_password': '', 'salt': VALID_SALT1, 'role': u'receiver', 'state': u'enabled', 'name': u'Generic User', 'description': u'King MockDummy Generic User', 'last_login': u'1970-01-01 00:00:00.000000', 'timezone': 0, 'language': u'en', 'password_change_needed': False, 'password_change_date': u'1970-01-01 00:00:00.000000', 'pgp_key_info': u'', 'pgp_key_fingerprint': u'', 'pgp_key_status': u'disabled', 'pgp_key_public': u'', 'pgp_key_expiration': u'1970-01-01 00:00:00.000000', 'pgp_key_remove': False } self.dummyReceiver = copy.deepcopy(self.dummyUser) self.dummyReceiver = sum_dicts(self.dummyReceiver, { 'can_delete_submission': True, 'can_postpone_expiration': True, 'contexts': [], 'tip_notification': True, 'presentation_order': 0, 'configuration': 'default' }) self.dummyFieldTemplates = load_json_file(WHISTLEBLOWER_IDENTITY_FIELD_PATH)['children'] for f in self.dummyFieldTemplates: f['fieldgroup_id'] = '' self.dummyFields = copy.deepcopy(self.dummyFieldTemplates) self.dummySteps = [ { 'id': '', 'label': u'Step 1', 'description': u'Step Description', 'presentation_order': 0, 'children': [] }, { 'id': '', 'label': u'Step 2', 'description': u'Step Description', 'hint': u'Step Hint', 'presentation_order': 1, 'children': [] } ] self.dummyContext = { 'id': '', 'name': u'Already localized name', 'description': u'Already localized desc', 'recipients_clarification': u'', 'presentation_order': 0, 'receivers': [], 'steps': [], 'select_all_receivers': True, 'tip_timetolive': 20, 'maximum_selectable_receivers': 0, 'show_small_cards': False, 'show_context': True, 'show_recipients_details': True, 'allow_recipients_selection': False, 'enable_comments': True, 'enable_messages': True, 'enable_two_way_comments': True, 'enable_two_way_messages': True, 'enable_attachments': True, 'show_receivers_in_alphabetical_order': False, 'questionnaire_layout': 'horizontal', 'reset_questionnaire': True } self.dummySubmission = { 'context_id': '', 'answers': {}, 'receivers': [], 'files': [] } self.dummyNode = { 'name': u"Please, set me: name/title", 'description': u"Pleæs€, set m€: d€scription", 'presentation': u'This is whæt æpp€ærs on top', 'footer': u'check it out https://www.youtube.com/franksentus ;)', 'security_awareness_title': u'', 'security_awareness_text': u'', 'whistleblowing_question': u'', 'whistleblowing_button': u'', 'hidden_service': u"http://1234567890123456.onion", 'public_site': u"https://globaleaks.org", 'email': u"*****@*****.**", 'languages_supported': [], # ignored 'languages_enabled': ["it", "en"], 'password': '', 'old_password': '', 'salt': 'OMG!, the Rains of Castamere ;( ;(', 'salt_receipt': '<<the Lannisters send their regards>>', 'maximum_filesize': 30, 'maximum_namesize': 120, 'maximum_textsize': 4096, 'tor2web_admin': True, 'tor2web_custodian': True, 'tor2web_whistleblower': True, 'tor2web_receiver': True, 'tor2web_unauth': True, 'can_postpone_expiration': False, 'can_delete_submission': False, 'can_grant_permissions': False, 'ahmia': False, 'allow_unencrypted': True, 'allow_iframes_inclusion': False, 'send_email_for_every_event': False, 'custom_homepage': False, 'disable_privacy_badge': False, 'disable_security_awareness_badge': False, 'disable_security_awareness_questions': False, 'disable_key_code_hint': False, 'disable_donation_panel': False, 'default_timezone': 0, 'default_language': u'en', 'admin_timezone': 0, 'admin_language': u'en', 'simplified_login': False, 'enable_captcha': False, 'enable_proof_of_work': False, 'enable_experimental_features': False, 'enable_custom_privacy_badge': False, 'custom_privacy_badge_tor': u'', 'custom_privacy_badge_none': u'', 'header_title_homepage': u'', 'header_title_submissionpage': u'', 'header_title_receiptpage': u'', 'header_title_tippage': u'', 'landing_page': u'homepage', 'context_selector_label': u'', 'show_contexts_in_alphabetical_order': False, 'submission_minimum_delay': 123, 'submission_maximum_ttl': 1111, 'widget_comments_title': '', 'widget_messages_title': '', 'widget_files_title': '', 'threshold_free_disk_megabytes_high': 200, 'threshold_free_disk_megabytes_medium': 500, 'threshold_free_disk_megabytes_low': 1000, 'threshold_free_disk_percentage_high': 3, 'threshold_free_disk_percentage_medium': 5, 'threshold_free_disk_percentage_low': 10 }
def __init__(self): self.dummyUser = { 'id': '', 'username': u'*****@*****.**', 'password': VALID_PASSWORD1, 'old_password': '', 'salt': VALID_SALT1, 'role': u'receiver', 'state': u'enabled', 'name': u'Generic User', 'description': u'King MockDummy', 'public_name': u'Charlie Brown', 'last_login': u'1970-01-01 00:00:00.000000', 'language': u'en', 'password_change_needed': False, 'password_change_date': u'1970-01-01 00:00:00.000000', 'pgp_key_fingerprint': u'', 'pgp_key_public': u'', 'pgp_key_expiration': u'1970-01-01 00:00:00.000000', 'pgp_key_remove': False } self.dummyReceiver = copy.deepcopy(self.dummyUser) self.dummyReceiver = sum_dicts(self.dummyReceiver, { 'can_delete_submission': True, 'can_postpone_expiration': True, 'contexts': [], 'tip_notification': True, 'presentation_order': 0, 'configuration': 'default' }) self.dummyContext = { 'id': '', 'name': u'Already localized name', 'description': u'Already localized desc', 'recipients_clarification': u'', 'presentation_order': 0, 'receivers': [], 'questionnaire_id': '', 'select_all_receivers': True, 'tip_timetolive': 20, 'maximum_selectable_receivers': 0, 'show_small_receiver_cards': False, 'show_context': True, 'show_recipients_details': True, 'allow_recipients_selection': False, 'enable_comments': True, 'enable_messages': True, 'enable_two_way_comments': True, 'enable_two_way_messages': True, 'enable_attachments': True, 'show_receivers_in_alphabetical_order': False, 'status_page_message': '' } self.dummySubmission = { 'context_id': '', 'answers': {}, 'receivers': [], 'files': [] } self.dummyNode = { 'name': u'Please, set me: name/title', 'description': u'Pleæs€, set m€: d€scription', 'presentation': u'This is whæt æpp€ærs on top', 'footer': u'check it out https://www.youtube.com/franksentus ;)', 'security_awareness_title': u'', 'security_awareness_text': u'', 'whistleblowing_question': u'', 'whistleblowing_button': u'', 'whistleblowing_receipt_prompt': u'', 'hidden_service': u'http://1234567890123456.onion', 'public_site': u'https://globaleaks.org', 'tb_download_link': u'https://www.torproject.org/download/download', 'email': u'*****@*****.**', 'languages_supported': [], # ignored 'languages_enabled': ['it', 'en'], 'receipt_salt': '<<the Lannisters send their regards>>', 'maximum_filesize': 30, 'maximum_namesize': 120, 'maximum_textsize': 4096, 'tor2web_admin': True, 'tor2web_custodian': True, 'tor2web_whistleblower': True, 'tor2web_receiver': True, 'tor2web_unauth': True, 'can_postpone_expiration': False, 'can_delete_submission': False, 'can_grant_permissions': False, 'ahmia': False, 'allow_indexing': False, 'allow_unencrypted': True, 'disable_encryption_warnings': False, 'allow_iframes_inclusion': False, 'custom_homepage': False, 'disable_submissions': False, 'disable_privacy_badge': False, 'disable_security_awareness_badge': False, 'disable_security_awareness_questions': False, 'disable_key_code_hint': False, 'disable_donation_panel': False, 'default_language': u'en', 'default_password': u'globaleaks', 'admin_language': u'en', 'simplified_login': False, 'enable_captcha': False, 'enable_proof_of_work': False, 'enable_experimental_features': False, 'enable_custom_privacy_badge': False, 'custom_privacy_badge_tor': u'', 'custom_privacy_badge_none': u'', 'header_title_homepage': u'', 'header_title_submissionpage': u'', 'header_title_receiptpage': u'', 'header_title_tippage': u'', 'landing_page': u'homepage', 'context_selector_type': u'list', 'contexts_clarification': u'', 'show_contexts_in_alphabetical_order': False, 'show_small_context_cards': False, 'submission_minimum_delay': 123, 'submission_maximum_ttl': 1111, 'widget_comments_title': '', 'widget_messages_title': '', 'widget_files_title': '', 'threshold_free_disk_megabytes_high': 200, 'threshold_free_disk_megabytes_medium': 500, 'threshold_free_disk_megabytes_low': 1000, 'threshold_free_disk_percentage_high': 3, 'threshold_free_disk_percentage_medium': 5, 'threshold_free_disk_percentage_low': 10, 'wbtip_timetolive': 90, 'basic_auth': False, 'basic_auth_username': '', 'basic_auth_password': '' }
def __init__(self): self.dummyUser = { 'id': '', 'username': u'*****@*****.**', 'password': VALID_PASSWORD1, 'old_password': '', 'salt': VALID_SALT1, 'role': u'receiver', 'state': u'enabled', 'name': u'Generic User', 'description': u'King MockDummy Generic User', 'last_login': u'1970-01-01 00:00:00.000000', 'timezone': 0, 'language': u'en', 'password_change_needed': False, 'password_change_date': u'1970-01-01 00:00:00.000000', 'pgp_key_info': u'', 'pgp_key_fingerprint': u'', 'pgp_key_status': u'disabled', 'pgp_key_public': u'', 'pgp_key_expiration': u'1970-01-01 00:00:00.000000', 'pgp_key_remove': False } self.dummyReceiver = copy.deepcopy(self.dummyUser) self.dummyReceiver = sum_dicts(self.dummyReceiver, { 'ping_mail_address': '*****@*****.**', 'can_delete_submission': True, 'can_postpone_expiration': True, 'contexts': [], 'tip_notification': True, 'ping_notification': True, 'tip_expiration_threshold': 72, 'presentation_order': 0, 'configuration': 'default' }) self.dummyFieldTemplates = [ { 'id': u'd4f06ad1-eb7a-4b0d-984f-09373520cce7', 'key': '', 'instance': 'template', 'editable': True, 'template_id': '', 'step_id': '', 'fieldgroup_id': '', 'label': u'Field 222', 'type': u'inputbox', 'preview': False, 'description': u'field description', 'hint': u'field hint', 'multi_entry': False, 'multi_entry_hint': '', 'stats_enabled': False, 'required': True, # <- first field is special, 'children': [], # it's marked as required!!! 'attrs': {}, 'options': [], 'y': 2, 'x': 0, 'width': 0 }, { 'id': u'c4572574-6e6b-4d86-9a2a-ba2e9221467d', 'key': '', 'instance': 'template', 'editable': True, 'template_id': '', 'step_id': '', 'fieldgroup_id': '', 'label': u'Field 2', 'type': u'inputbox', 'preview': False, 'description': 'description', 'hint': u'field hint', 'multi_entry': False, 'multi_entry_hint': '', 'stats_enabled': False, 'required': False, 'children': [], 'attrs': {}, 'options': [], 'y': 3, 'x': 0, 'width': 0 }, { 'id': u'6a6e9282-15e8-47cd-9cc6-35fd40a4a58f', 'key': '', 'instance': 'template', 'editable': True, 'step_id': '', 'template_id': '', 'fieldgroup_id': '', 'label': u'Generalities', 'type': u'fieldgroup', 'preview': False, 'description': u'field description', 'hint': u'field hint', 'multi_entry': False, 'multi_entry_hint': '', 'stats_enabled': False, 'required': False, 'children': [], 'attrs': {}, 'options': [], 'y': 4, 'x': 0, 'width': 0 }, { 'id': u'7459abe3-52c9-4a7a-8d48-cabe3ffd2abd', 'key': '', 'instance': 'template', 'editable': True, 'template_id': '', 'step_id': '', 'fieldgroup_id': '', 'label': u'Name', 'type': u'inputbox', 'preview': False, 'description': u'field description', 'hint': u'field hint', 'multi_entry': False, 'multi_entry_hint': '', 'stats_enabled': False, 'required': False, 'children': [], 'attrs': {}, 'options': [], 'y': 0, 'x': 0, 'width': 0 }, { 'id': u'de1f0cf8-63a7-4ed8-bc5d-7cf0e5a2aec2', 'key': '', 'instance': 'template', 'editable': True, 'template_id': '', 'step_id': '', 'fieldgroup_id': '', 'label': u'Surname', 'type': u'inputbox', 'preview': False, 'description': u'field description', 'hint': u'field hint', 'multi_entry': False, 'multi_entry_hint': '', 'stats_enabled': False, 'required': False, 'children': [], 'attrs': {}, 'options': [], 'y': 0, 'x': 0, 'width': 0 }, { 'id': u'7e1f0cf8-63a7-4ed8-bc5d-7cf0e5a2aec2', 'key': '', 'instance': 'template', 'editable': True, 'template_id': '', 'step_id': '', 'fieldgroup_id': '', 'label': u'Gender', 'type': u'selectbox', 'preview': False, 'description': u'field description', 'hint': u'field hint', 'multi_entry': False, 'multi_entry_hint': '', 'stats_enabled': False, 'required': False, 'children': [], 'attrs': {}, 'options': [ { 'id': '2ebf6df8-289a-4f17-aa59-329fe11d232e', 'label': 'Male', 'value': '', 'presentation_order': 0, 'score_points': 0, 'activated_fields': [] }, { 'id': '9c7f343b-ed46-4c9e-9121-a54b6e310123', 'label': 'Female', 'value': '', 'presentation_order': 0, 'score_points': 0, 'activated_fields': [] } ], 'y': 0, 'x': 0, 'width': 0 }] self.dummyFields = copy.deepcopy(self.dummyFieldTemplates) self.dummySteps = [ { 'id': '', 'label': u'Step 1', 'description': u'Step Description', 'presentation_order': 0, 'children': [] }, { 'id': '', 'label': u'Step 2', 'description': u'Step Description', 'hint': u'Step Hint', 'presentation_order': 1, 'children': [] } ] self.dummyContext = { 'id': '', 'name': u'Already localized name', 'description': u'Already localized desc', 'recipients_clarification': u'', 'presentation_order': 0, 'custodians': [], 'receivers': [], 'steps': [], 'select_all_receivers': True, 'tip_timetolive': 20, 'maximum_selectable_receivers': 0, 'show_small_cards': False, 'show_context': True, 'show_receivers': False, 'enable_comments': True, 'enable_messages': True, 'enable_two_way_comments': True, 'enable_two_way_messages': True, 'enable_attachments': True, 'show_receivers_in_alphabetical_order': False, 'questionnaire_layout': 'horizontal', 'reset_questionnaire': True } self.dummySubmission = { 'context_id': '', 'answers': {}, 'receivers': [], 'files': [] } self.dummyNode = { 'name': u"Please, set me: name/title", 'description': u"Pleæs€, set m€: d€scription", 'presentation': u'This is whæt æpp€ærs on top', 'footer': u'check it out https://www.youtube.com/franksentus ;)', 'security_awareness_title': u'', 'security_awareness_text': u'', 'whistleblowing_question': u'', 'whistleblowing_button': u'', 'hidden_service': u"http://1234567890123456.onion", 'public_site': u"https://globaleaks.org", 'email': u"*****@*****.**", 'languages_supported': [], # ignored 'languages_enabled': ["it", "en"], 'password': '', 'old_password': '', 'salt': 'OMG!, the Rains of Castamere ;( ;(', 'salt_receipt': '<<the Lannisters send their regards>>', 'maximum_filesize': 30, 'maximum_namesize': 120, 'maximum_textsize': 4096, 'tor2web_admin': True, 'tor2web_custodian': True, 'tor2web_whistleblower': True, 'tor2web_receiver': True, 'tor2web_unauth': True, 'can_postpone_expiration': False, 'can_delete_submission': False, 'can_grant_permissions': False, 'ahmia': False, 'allow_unencrypted': True, 'allow_iframes_inclusion': False, 'send_email_for_every_event': False, 'custom_homepage': False, 'disable_privacy_badge': False, 'disable_security_awareness_badge': False, 'disable_security_awareness_questions': False, 'disable_key_code_hint': False, 'disable_donation_panel': False, 'default_timezone': 0, 'default_language': u'en', 'admin_timezone': 0, 'admin_language': u'en', 'simplified_login': False, 'enable_captcha': False, 'enable_proof_of_work': False, 'enable_custom_privacy_badge': False, 'custom_privacy_badge_tor': u'', 'custom_privacy_badge_none': u'', 'header_title_homepage': u'', 'header_title_submissionpage': u'', 'header_title_receiptpage': u'', 'header_title_tippage': u'', 'landing_page': u'homepage', 'context_selector_label': u'', 'show_contexts_in_alphabetical_order': False, 'submission_minimum_delay': 123, 'submission_maximum_ttl': 1111, 'widget_comments_title': '', 'widget_messages_title': '', 'widget_files_title': '', 'threshold_free_disk_megabytes_high': 200, 'threshold_free_disk_megabytes_medium': 500, 'threshold_free_disk_megabytes_low': 1000, 'threshold_free_disk_percentage_high': 3, 'threshold_free_disk_percentage_medium': 5, 'threshold_free_disk_percentage_low': 10 }
def get_dummy_receiver(self, descpattern): new_u = self.get_dummy_user('receiver', descpattern) new_r = dict(MockDict().dummyReceiver) new_r['ping_mail_address'] = unicode('%s@%s.xxx' % (descpattern, descpattern)) return sum_dicts(new_r, new_u)
def get_dummy_receiver(self, username): new_u = self.get_dummy_user('receiver', username) new_r = dict(MockDict().dummyUser) return sum_dicts(new_r, new_u)
def __init__(self): self.dummyUser = { 'id': '', 'username': u'*****@*****.**', 'password': VALID_PASSWORD1, 'old_password': '', 'salt': VALID_SALT1, 'role': u'receiver', 'state': u'enabled', 'name': u'Generic User', 'description': u'King MockDummy', 'public_name': u'Charlie Brown', 'last_login': u'1970-01-01 00:00:00.000000', 'language': u'en', 'password_change_needed': False, 'password_change_date': u'1970-01-01 00:00:00.000000', 'pgp_key_fingerprint': u'', 'pgp_key_public': u'', 'pgp_key_expiration': u'1970-01-01 00:00:00.000000', 'pgp_key_remove': False } self.dummyReceiver = copy.deepcopy(self.dummyUser) self.dummyReceiver = sum_dicts( self.dummyReceiver, { 'can_delete_submission': True, 'can_postpone_expiration': True, 'contexts': [], 'tip_notification': True, 'presentation_order': 0, 'configuration': 'default' }) self.dummyContext = { 'id': '', 'name': u'Already localized name', 'description': u'Already localized desc', 'recipients_clarification': u'', 'presentation_order': 0, 'receivers': [], 'questionnaire_id': '', 'select_all_receivers': True, 'tip_timetolive': 20, 'maximum_selectable_receivers': 0, 'show_small_receiver_cards': False, 'show_context': True, 'show_recipients_details': True, 'allow_recipients_selection': False, 'enable_comments': True, 'enable_messages': True, 'enable_two_way_comments': True, 'enable_two_way_messages': True, 'enable_attachments': True, 'enable_rc_to_wb_files': True, 'show_receivers_in_alphabetical_order': False, 'status_page_message': '' } self.dummySubmission = { 'context_id': '', 'answers': {}, 'receivers': [], 'files': [] } self.dummyNode = { 'name': u'Please, set me: name/title', 'description': u'Pleæs€, set m€: d€scription', 'presentation': u'This is whæt æpp€ærs on top', 'footer': u'check it out https://www.youtube.com/franksentus ;)', 'security_awareness_title': u'', 'security_awareness_text': u'', 'whistleblowing_question': u'', 'whistleblowing_button': u'', 'whistleblowing_receipt_prompt': u'', 'hostname': u'www.globaleaks.org', 'onionservice': u'', 'tb_download_link': u'https://www.torproject.org/download/download', 'email': u'*****@*****.**', 'languages_supported': [], # ignored 'languages_enabled': ['it', 'en'], 'latest_version': __version__, 'receipt_salt': '<<the Lannisters send their regards>>', 'maximum_filesize': 30, 'maximum_namesize': 120, 'maximum_textsize': 4096, 'tor2web_admin': True, 'tor2web_custodian': True, 'tor2web_whistleblower': True, 'tor2web_receiver': True, 'can_postpone_expiration': False, 'can_delete_submission': False, 'can_grant_permissions': False, 'ahmia': False, 'allow_indexing': False, 'allow_unencrypted': True, 'disable_encryption_warnings': False, 'allow_iframes_inclusion': False, 'custom_homepage': False, 'disable_submissions': False, 'disable_privacy_badge': False, 'disable_security_awareness_badge': False, 'disable_security_awareness_questions': False, 'disable_key_code_hint': False, 'disable_donation_panel': False, 'default_language': u'en', 'default_password': u'globaleaks', 'default_questionnaire': u'default', 'admin_language': u'en', 'simplified_login': False, 'enable_captcha': False, 'enable_proof_of_work': False, 'enable_experimental_features': False, 'enable_custom_privacy_badge': False, 'custom_privacy_badge_tor': u'', 'custom_privacy_badge_none': u'', 'header_title_homepage': u'', 'header_title_submissionpage': u'', 'header_title_receiptpage': u'', 'header_title_tippage': u'', 'landing_page': u'homepage', 'context_selector_type': u'list', 'contexts_clarification': u'', 'show_contexts_in_alphabetical_order': False, 'show_small_context_cards': False, 'widget_comments_title': '', 'widget_messages_title': '', 'widget_files_title': '', 'threshold_free_disk_megabytes_high': 200, 'threshold_free_disk_megabytes_medium': 500, 'threshold_free_disk_megabytes_low': 1000, 'threshold_free_disk_percentage_high': 3, 'threshold_free_disk_percentage_medium': 5, 'threshold_free_disk_percentage_low': 10, 'wbtip_timetolive': 90, 'basic_auth': False, 'basic_auth_username': '', 'basic_auth_password': '', 'reachable_via_web': False, 'anonymize_outgoing_connections': False, }