mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Fix bug in envvar source tests when run in Python 2.7
Due to an import error the envvar source tests would not run in Python 2.7
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
from six import text_type
|
||||
from unittest import TestCase
|
||||
from unittest.mock import patch
|
||||
|
||||
try:
|
||||
# Python 3
|
||||
from unittest.mock import patch
|
||||
except ImportError:
|
||||
# Python 2
|
||||
from mock import patch
|
||||
|
||||
from octodns.source.envvar import EnvVarSource
|
||||
from octodns.source.envvar import EnvironmentVariableNotFoundException
|
||||
|
||||
Reference in New Issue
Block a user