tests/unit/__init__.py
raw| 1 | import unittest |
| 2 | import sys |
| 3 | |
| 4 | import nose2 |
| 5 | from unittest.mock import patch |
| 6 | |
| 7 | __author__ = "Nitin Kumar" |
| 8 | __credits__ = "Jeremy Schulman" |
| 9 | |
| 10 | |
| 11 | class TestJunosInit(unittest.TestCase): |
| 12 | def test_warning(self): |
| 13 | with patch.object(sys.modules["sys"], "version_info", (3, 8, 0)) as mock_sys: |
| 14 | from jnpr import junos |
| 15 | |
| 16 | self.assertEqual(mock_sys, (3, 8, 0)) |