Skip to content

Commit

Permalink
BUG: 500 Internal error
Browse files Browse the repository at this point in the history
  • Loading branch information
raahoolkumeriya committed Jul 31, 2021
1 parent cc75230 commit df1ee42
Show file tree
Hide file tree
Showing 14 changed files with 605 additions and 703 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ __pycache__/
# C extensions
*.so

# VSCODE
.vscode

# Distribution / packaging
.Python
build/
Expand Down
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,33 @@ This project uses pytest to define tests because it allows you to use the assert

To run all the tests of a project, simply run the pytest command:


└─ $ ▶ pytest -p no:warnings tests -v --color=yes --exitfirst --showlocals --durations=5
└─ $ ▶ pytest -p no:warnings tests -v --color=yes --exitfirst --showlocals --durations=5 -vv
========================================================================== test session starts ==========================================================================
platform linux -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /home/raahool/anaconda3/envs/HSBC/bin/python
cachedir: .pytest_cache
rootdir: /application/coding_test/GITHUB/malicious_detection
collected 11 items

tests/test_client.py::test_api_key_avilable_for_connection_in_urlscan PASSED [ 9%]
tests/test_client.py::test_api_key_avilable_for_connection_in_virustotal PASSED [ 18%]
tests/test_client.py::test_connection_for_urlscan_api PASSED [ 27%]
tests/test_client.py::test_connection_for_virustotal_api PASSED [ 36%]
tests/test_main.py::test_get_summary_with_query_parameter PASSED [ 45%]
tests/test_main.py::test_get_summary_with_ip_as_path_parameter_not_200 PASSED [ 54%]
tests/test_main.py::test_get_summary_with_domain_path_parameter_not_200 PASSED [ 63%]
tests/test_resolve.py::test_utility_resolve_get_ip PASSED [ 72%]
tests/test_resolve.py::test_utility_resolve_get_a_record PASSED [ 81%]
tests/test_resolve.py::test_valid_domain_name PASSED [ 90%]
tests/test_resolve.py::test_valid_ip_address PASSED [100%]
rootdir: /application/coding_test/malicious_detection
plugins: anyio-3.3.0, asyncio-0.15.1
collected 14 items

tests/test_main.py::test_conifguration_file_is_configured_and_loaded PASSED [ 7%]
tests/test_main.py::test_application_response_for_200 PASSED [ 14%]
tests/test_main.py::test_domain_name_validation PASSED [ 21%]
tests/test_main.py::test_ip_address_validation PASSED [ 28%]
tests/test_main.py::test_get_resolve_ip_address PASSED [ 35%]
tests/test_main.py::test_get_resolve_damain_name PASSED [ 42%]
tests/test_main.py::test_post_data_from_urlscan PASSED [ 50%]
tests/test_main.py::test_get_summary_with_ip_as_path_parameter PASSED [ 57%]
tests/test_main.py::test_get_summary_with_domain_name_as_path_parameter PASSED [ 64%]
tests/test_main.py::test_get_summary_with_ip_in_query_parameter PASSED [ 71%]
tests/test_main.py::test_get_summary_with_domain_in_query_parameter PASSED [ 78%]
tests/test_main.py::test_determnation_of_malicious_result PASSED [ 85%]
tests/test_main.py::test_determnation_of_malicious_result_with_domain PASSED [ 92%]
tests/test_main.py::test_determination_of_malicious_application_banner PASSED [100%]

========================================================================== slowest 5 durations ==========================================================================
4.83s call tests/test_client.py::test_connection_for_urlscan_api
2.15s call tests/test_client.py::test_connection_for_virustotal_api
0.57s call tests/test_resolve.py::test_utility_resolve_get_a_record

(2 durations < 0.005s hidden. Use -vv to show these durations.)
========================================================================== 11 passed in 7.84s ===========================================================================
38.67s call tests/test_main.py::test_get_summary_with_ip_as_path_parameter
37.46s call tests/test_main.py::test_get_summary_with_domain_in_query_parameter
36.53s call tests/test_main.py::test_get_summary_with_ip_in_query_parameter
35.98s call tests/test_main.py::test_get_summary_with_domain_name_as_path_parameter
34.86s call tests/test_main.py::test_determnation_of_malicious_result
==================================================================== 14 passed in 219.63s (0:03:39) =====================================================================
Loading

0 comments on commit df1ee42

Please sign in to comment.