mirror of
https://github.com/mtan93/cachet-url-monitor.git
synced 2026-03-08 05:31:58 +00:00
Upgrading to python3 (#60)
* Migrating to python 3.7.2, but docker image is not working properly. Need to continue investigating why it's not properly running. * Trying to fix the build and fixing logging in the scheduler initialization. * Trying to fix the build * Collecting test results * Fixing the dockerfile * Updating the development dependencies
This commit is contained in:
@@ -10,10 +10,11 @@ import cachet_url_monitor.status
|
||||
sys.modules['requests'] = mock.Mock()
|
||||
sys.modules['logging'] = mock.Mock()
|
||||
from cachet_url_monitor.configuration import Configuration
|
||||
from test.test_support import EnvironmentVarGuard
|
||||
import os
|
||||
|
||||
|
||||
class ConfigurationTest(unittest.TestCase):
|
||||
@mock.patch.dict(os.environ, {'CACHET_TOKEN': 'token2'})
|
||||
def setUp(self):
|
||||
def getLogger(name):
|
||||
self.mock_logger = mock.Mock()
|
||||
@@ -30,9 +31,6 @@ class ConfigurationTest(unittest.TestCase):
|
||||
|
||||
sys.modules['requests'].get = get
|
||||
|
||||
self.env = EnvironmentVarGuard()
|
||||
self.env.set('CACHET_TOKEN', 'token2')
|
||||
|
||||
self.configuration = Configuration('config.yml')
|
||||
sys.modules['requests'].Timeout = Timeout
|
||||
sys.modules['requests'].ConnectionError = ConnectionError
|
||||
|
||||
Reference in New Issue
Block a user