Skip to content

Commit

Permalink
Update text with GoPhish to Gophish in test_tools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ameliav committed Oct 18, 2021
1 parent 09a7b2b commit 94bba85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env pytest -vs
"""Tests for GoPhish tool functions."""
"""Tests for Gophish tool functions."""

# Third-Party Libraries
from mock import patch
Expand Down Expand Up @@ -38,14 +38,14 @@ class TestExport:

@patch("tools.connect")
def test_assessment_exists_found(self, mock_api, multiple_campaign_object):
"""Verify True is returned when assessment is in GoPhish."""
"""Verify True is returned when assessment is in Gophish."""
mock_api.campaigns.get.return_value = multiple_campaign_object

assert assessment_exists(mock_api, "RVXXX1") is True

@patch("tools.connect")
def test_assessment_exists_not_found(self, mock_api, multiple_campaign_object):
"""Verify False is returned when assessment is not in GoPhish."""
"""Verify False is returned when assessment is not in Gophish."""
mock_api.campaigns.get.return_value = multiple_campaign_object
assert assessment_exists(mock_api, "RVXXX3") is False

Expand All @@ -55,12 +55,12 @@ def test_find_unique_target_clicks_count(self, mock_api, multiple_click_object):
assert find_unique_target_clicks_count(multiple_click_object) == 4

def mock_get_group_ids(self, s, group_object):
"""Return a mock list of GoPhish group objects."""
"""Return a mock list of Gophish group objects."""
return group_object

# Mocks the group id's returned for the assessment's groups.
@patch("tools.gophish_export.get_group_ids", return_value=[1, 2])
# Mock API to allow GoPhish group objects to be returned.
# Mock API to allow Gophish group objects to be returned.
@patch("tools.connect")
def test_export_targets(
self, mock_api, mock_export, multiple_gophish_group_object, email_target_json
Expand Down

0 comments on commit 94bba85

Please sign in to comment.