diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-18 13:14:46 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-19 01:08:39 +0200 |
commit | 0914c7e7011b7ba3ed9eeae7f6c3605afb711640 (patch) | |
tree | 92cc8701b0cb63e1ae90990e83c13c63a72e2551 /functest/tests/unit/utils | |
parent | 3f46c1858ccfc08dc6b5a5a5ce123f2f3fcf2234 (diff) |
Stop getting git data from functest dir
Functest is no longer a git clone.
Change-Id: Ieaceacaa820e9a7a3c64e8c1fbd2a8a9321f234d
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/utils')
-rw-r--r-- | functest/tests/unit/utils/test_functest_utils.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py index 6f7976e4..fbfa420a 100644 --- a/functest/tests/unit/utils/test_functest_utils.py +++ b/functest/tests/unit/utils/test_functest_utils.py @@ -13,7 +13,6 @@ import os import time import unittest -from git.exc import NoSuchPathError import mock import requests from six.moves import urllib @@ -98,27 +97,6 @@ class FunctestUtilsTesting(unittest.TestCase): m.assert_called_once_with(dest, 'wb') self.assertTrue(mock_sh.called) - def test_get_git_branch(self): - with mock.patch('functest.utils.functest_utils.Repo') as mock_repo: - mock_obj2 = mock.Mock() - attrs = {'name': 'test_branch'} - mock_obj2.configure_mock(**attrs) - - mock_obj = mock.Mock() - attrs = {'active_branch': mock_obj2} - mock_obj.configure_mock(**attrs) - - mock_repo.return_value = mock_obj - self.assertEqual(functest_utils.get_git_branch(self.repo_path), - 'test_branch') - - @mock.patch('functest.utils.functest_utils.Repo', - side_effect=NoSuchPathError) - def test_get_git_branch_failed(self, mock_repo): - self.assertRaises(NoSuchPathError, - lambda: functest_utils.get_git_branch(self.repo_path - )) - @mock.patch('functest.utils.functest_utils.logger.error') def test_get_installer_type_failed(self, mock_logger_error): with mock.patch.dict(os.environ, |