Skip to content

Commit

Permalink
mock redis config in download tests
Browse files Browse the repository at this point in the history
removes the need to set the env vars externally
  • Loading branch information
aperrin66 committed Sep 5, 2024
1 parent 128b675 commit 1f48c66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_downloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ def simulate_no_space_left(file, url, connection):
class HTTPDownloaderTestCase(unittest.TestCase):
"""Tests for the HTTPDownloader"""

def setUp(self):
mock.patch('geospaas_processing.utils.REDIS_HOST', None).start()
mock.patch('geospaas_processing.utils.REDIS_PORT', None).start()
self.addCleanup(mock.patch.stopall)

def test_build_oauth2_authentication(self):
"""Test the creation of an OAuth2 object"""
fake_token = {
Expand Down

0 comments on commit 1f48c66

Please sign in to comment.