aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/home/tests
diff options
context:
space:
mode:
authorGravatar Jeremiah Boby <[email protected]>2019-07-10 02:45:41 +0100
committerGravatar Jeremiah Boby <[email protected]>2019-07-10 02:45:41 +0100
commit56b7cbd351fcf2850a8f840293bea1ca007ea3ba (patch)
treec3ddcabfb37b3e34d82ada4f22b25ab203fec4f0 /pydis_site/apps/home/tests
parentRemove extra space in flake8 (diff)
Teach new lint rules to old code
Diffstat (limited to 'pydis_site/apps/home/tests')
-rw-r--r--pydis_site/apps/home/tests/test_repodata_helpers.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/pydis_site/apps/home/tests/test_repodata_helpers.py b/pydis_site/apps/home/tests/test_repodata_helpers.py
index 59cb2331..df1ffd73 100644
--- a/pydis_site/apps/home/tests/test_repodata_helpers.py
+++ b/pydis_site/apps/home/tests/test_repodata_helpers.py
@@ -34,13 +34,11 @@ class TestRepositoryMetadataHelpers(TestCase):
def setUp(self):
"""Executed before each test method."""
-
self.home_view = HomeView()
@mock.patch('requests.get', side_effect=mocked_requests_get)
def test_returns_metadata(self, _: mock.MagicMock):
"""Test if the _get_repo_data helper actually returns what it should."""
-
metadata = self.home_view._get_repo_data()
self.assertIsInstance(metadata[0], RepositoryMetadata)
@@ -48,7 +46,6 @@ class TestRepositoryMetadataHelpers(TestCase):
def test_returns_cached_metadata(self):
"""Test if the _get_repo_data helper returns cached data when available."""
-
repo_data = RepositoryMetadata(
repo_name="python-discord/site",
description="testrepo",
@@ -65,7 +62,6 @@ class TestRepositoryMetadataHelpers(TestCase):
@mock.patch('requests.get', side_effect=mocked_requests_get)
def test_refresh_stale_metadata(self, _: mock.MagicMock):
"""Test if the _get_repo_data helper will refresh when the data is stale"""
-
repo_data = RepositoryMetadata(
repo_name="python-discord/site",
description="testrepo",
@@ -82,7 +78,6 @@ class TestRepositoryMetadataHelpers(TestCase):
@mock.patch('requests.get', side_effect=mocked_requests_get)
def test_returns_api_data(self, _: mock.MagicMock):
"""Tests if the _get_api_data helper returns what it should."""
-
api_data = self.home_view._get_api_data()
repo = self.home_view.repos[0]
@@ -94,7 +89,6 @@ class TestRepositoryMetadataHelpers(TestCase):
@mock.patch('requests.get', side_effect=mocked_requests_get)
def test_mocked_requests_get(self, mock_get: mock.MagicMock):
"""Tests if our mocked_requests_get is returning what it should."""
-
success_data = mock_get(HomeView.github_api)
fail_data = mock_get("failtest")