def test_clean_one_environments(self):
     """test_clean_environments should create an environment manager and clean the environment."""
     self.mock_rv.communicate.return_value = [WITH, None]
     result = environment_controller.check_python_process()
     self.assertEqual(True, result)
     self.mock_rv.communicate.return_value = [WITHOUT, None]
     environment_controller.clean_environments()
     self.assertTrue(self.mock_popen.called)
     result = environment_controller.check_python_process()
     self.assertEqual(False, result)
Exemple #2
0
 def test_clean_one_environments(self):
     """test_clean_environments should create an environment manager and clean the environment."""
     self.mock_rv.communicate.return_value = [WITH, None]
     result = environment_controller.check_python_process()
     self.assertEqual(True, result)
     self.mock_rv.communicate.return_value = [WITHOUT, None]
     environment_controller.clean_environments()
     self.assertTrue(self.mock_popen.called)
     result = environment_controller.check_python_process()
     self.assertEqual(False, result)
    def test_clean_no_environments(self):
        """test_clean_no_environments should check that there are no environments to clean."""
        result = environment_controller.check_python_process()
        self.assertEqual(False, result)

        environment_controller.clean_environments()
        self.assertTrue(self.mock_popen.called)
Exemple #4
0
    def test_clean_no_environments(self):
        """test_clean_no_environments should check that there are no environments to clean."""
        result = environment_controller.check_python_process()
        self.assertEqual(False, result)

        environment_controller.clean_environments()
        self.assertTrue(self.mock_popen.called)