Ejemplo n.º 1
0
class TestPythonInfo(unittest.TestCase):
    def setUp(self):
        self.python_info = PythonInfo()

    @mock.patch('xcrawler.pythonutils.info.python_info.version_info')
    def test_is_python2(self, mock_version_info):
        mock_version_info.major = 2
        result = self.python_info.is_python2()
        self.assertEquals(result, True)

    @mock.patch('xcrawler.pythonutils.info.python_info.version_info')
    def test_is_python3(self, mock_version_info):
        mock_version_info.major = 3
        result = self.python_info.is_python3()
        self.assertEquals(result, True)
Ejemplo n.º 2
0
class TestPythonInfo(unittest.TestCase):

    def setUp(self):
        self.python_info = PythonInfo()

    @mock.patch('xcrawler.pythonutils.info.python_info.version_info')
    def test_is_python2(self, mock_version_info):
        mock_version_info.major = 2
        result = self.python_info.is_python2()
        self.assertEquals(result, True)

    @mock.patch('xcrawler.pythonutils.info.python_info.version_info')
    def test_is_python3(self, mock_version_info):
        mock_version_info.major = 3
        result = self.python_info.is_python3()
        self.assertEquals(result, True)
Ejemplo n.º 3
0
 def __init__(self, python_info=PythonInfo()):
     self.python_info = python_info
Ejemplo n.º 4
0
 def setUp(self):
     self.python_info = PythonInfo()
Ejemplo n.º 5
0
 def setUp(self):
     self.python_info = PythonInfo()