GSoC week-1

Hi all, this is the first week of GSoc 2018

Report

I have created the following unittests for SNARE

test_converter.py (merged)

  • test_converter: By converting dummy files and checking if the converted file names match with in the meta.json

test_add_meta_tag.py (merged)

  • test_add_meta_tag: By calling the function on dummy files without meta tags, and checking if the tags get added after function call.

test_get_dorks.py (merged)

  • test_get_dorks: to check if the session.get() was called with correct parameters
  • test_return_dorks: to check if dorks obtained from ClientSession.json() is returned properly.
  • test_return_dorks_exception: to check if the exception occuring in the function is raised properly.

test_submit_data.py (merged)

  • test_post_data: to check if the session.post() was called with correct parameters.
  • test_event_result: to check if event_result obtained from ClientSession.json() is returned properly.
  • test_event_result_exception: to check if the exception occurring in the function is raised properly.

test_handle_html_content.py (merged)

  • test_handle_content: To check if the html content is handled properly and expected content is returned.
  • test_handle_content_no_dorks: To check if the html content is handled properly without dorks and expected content is returned.
  • test_handle_content_exception: To check if exception is raised properly from the function.

test_handle_error (merged)

  • test_create_error_data: To check if the create_data() was called with the right parameters
  • test_submit_error_data: To check if submit_data() was called with the right parameters
  • test_handle_error_data: To check if super().handle_error() was called with right parameters

test_handle_request (merged)

  • test_create_request_data: To check if the create_data() was called with the right parameters
  • test_submit_request_data: To check if submit_data() was called with the right parameters
  • test_submit_request_slurp: To check if submit_slurp() was called with the right parameters
  • test_parse_response: To check if parse_tanner_response was called with right parameters.
  • test_handle_response: To check if Response object was handled as expected.

test_create_data (merged)

  • test_create_data: to check if expected data is created for the given input parameters.

test_parse_tanner_response (merged)

  • test_parse_type_one: To check if type one request is parsed as expected.
  • test_parse_type_two: To check if type two request is parsed as expected.
  • test_parse_type_three: To check if type three request is parsed as expected.
  • test_parse_exception: To check if exception is raised properly by the function.
Written on May 21, 2018