Skip to content

Commit

Permalink
Add checks to unit test
Browse files Browse the repository at this point in the history
The name of the test is now clearer and it checks the results for the first and
last items in the list.
  • Loading branch information
lucyb committed Nov 30, 2023
1 parent c393fb0 commit 1bdadd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/metrics/github/test_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_security_number_of_alerts_last_year():
assert result["open"] == 3


def test_security_parse_vulnerabilities_earliest_date():
def test_security_parse_vulnerabilities_earliest_and_latest_date():
result = security.parse_vulnerabilities(
fake_vulnerabilities("test-org"), "test-org"
)
Expand All @@ -95,3 +95,5 @@ def test_security_parse_vulnerabilities_earliest_date():
assert result[0]["closed"] == 0
assert result[0]["open"] == 1
assert str(result[-1]["date"]) == "2023-10-26"
assert result[-1]["closed"] == 4
assert result[-1]["open"] == 3

0 comments on commit 1bdadd8

Please sign in to comment.