Skip to content

Commit

Permalink
0.1.2 - Dependency update. (#28)
Browse files Browse the repository at this point in the history
* chore(dependencies): Bump urllib3 version.

For high sev security vulnerability.

* chore(tests): Fixed an issue with test failures.

Test asseration for Google LLC failing. Changed to GOOGLE.

* chore: Bumped version and added classifiers.

* chore: Bumped version to 0.1.2

* docs: Added 0.1.2 changelog.
  • Loading branch information
dbrennand committed Apr 10, 2021
1 parent 28e0750 commit 7d13c78
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 82 deletions.
152 changes: 76 additions & 76 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ To run the tests, perform the following steps:

## Changelog

* 0.1.2 - Update dependencies for security vulnerability. Fixed an issue with some tests failing.

* 0.1.1 - Added Context Manager support and tests. Updated dependencies and license year.

* 0.1.0 - Added support for the VirusTotal v3 API. Library redesign (new usage, examples, tests and more.) See [#24](https://github.com/dbrennand/virustotal-python/pull/24).
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="virustotal-python",
version="0.1.1",
version="0.1.2",
author="dbrennand",
description="A Python library to interact with the public VirusTotal v2 and v3 APIs.",
long_description=long_description,
Expand All @@ -16,6 +16,8 @@
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
keywords="VirusTotal Wrapper Public API Library v2 v3",
)
8 changes: 4 additions & 4 deletions virustotal_python/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def test_retrieve_ip_info_v2(vtotal_v2):
assert resp.status_code == 200
assert resp.response_code == 1
json = resp.json()
assert json["as_owner"] == "Google LLC"
assert json["as_owner"] == "GOOGLE"
assert json["country"] == "US"
assert json["verbose_msg"] == "IP address in dataset"
for sample in json["detected_communicating_samples"]:
Expand All @@ -248,7 +248,7 @@ def test_retrieve_ip_info_v3(vtotal_v3):
resp = vtotal_v3.request(f"ip_addresses/{IP}")
assert resp.status_code == 200
data = resp.data
assert data["attributes"]["as_owner"] == "Google LLC"
assert data["attributes"]["as_owner"] == "GOOGLE"
assert data["attributes"]["country"] == "US"
assert data["attributes"]["last_analysis_stats"]
assert data["attributes"]["reputation"]
Expand Down Expand Up @@ -306,7 +306,7 @@ def test_contextmanager_v2():
resp = vtotal.request("ip-address/report", params={"ip": IP})
assert resp.status_code == 200
data = resp.json()
assert data["as_owner"] == "Google LLC"
assert data["as_owner"] == "GOOGLE"
assert data["country"] == "US"


Expand All @@ -320,5 +320,5 @@ def test_contextmanager_v3():
assert resp.status_code == 200
data = resp.data
assert data["id"] == IP
assert data["attributes"]["as_owner"] == "Google LLC"
assert data["attributes"]["as_owner"] == "GOOGLE"
assert data["attributes"]["country"] == "US"
2 changes: 1 addition & 1 deletion virustotal_python/virustotal.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def __init__(
:param TIMEOUT: A float for the amount of time to wait in seconds for the HTTP request before timing out.
:raises ValueError: Raises ValueError when no API_KEY is provided or the API_VERSION is invalid.
"""
self.VERSION = "0.1.1"
self.VERSION = "0.1.2"
if API_KEY is None:
raise ValueError(
"An API key is required to interact with the VirusTotal API.\nProvide one to the API_KEY parameter or by setting the environment variable 'VIRUSTOTAL_API_KEY'."
Expand Down

0 comments on commit 7d13c78

Please sign in to comment.