aboutsummaryrefslogtreecommitdiff
path: root/rh/hooks_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'rh/hooks_unittest.py')
-rwxr-xr-xrh/hooks_unittest.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/rh/hooks_unittest.py b/rh/hooks_unittest.py
index 45ad688..4f2103a 100755
--- a/rh/hooks_unittest.py
+++ b/rh/hooks_unittest.py
@@ -179,17 +179,24 @@ class PlaceholderTests(unittest.TestCase):
@mock.patch.object(rh.git, 'find_repo_root')
def testREPO_OUTER_ROOT(self, m):
"""Verify handling of REPO_OUTER_ROOT."""
- m.side_effect=mock_find_repo_root
+ m.side_effect = mock_find_repo_root
self.assertEqual(self.replacer.get('REPO_OUTER_ROOT'),
mock_find_repo_root(path=None, outer=True))
@mock.patch.object(rh.git, 'find_repo_root')
def testREPO_ROOT(self, m):
"""Verify handling of REPO_ROOT."""
- m.side_effect=mock_find_repo_root
+ m.side_effect = mock_find_repo_root
self.assertEqual(self.replacer.get('REPO_ROOT'),
mock_find_repo_root(path=None, outer=False))
+ def testREPO_PATH(self):
+ """Verify handling of REPO_PATH."""
+ os.environ['REPO_PATH'] = ''
+ self.assertEqual(self.replacer.get('REPO_PATH'), '')
+ os.environ['REPO_PATH'] = 'foo/bar'
+ self.assertEqual(self.replacer.get('REPO_PATH'), 'foo/bar')
+
@mock.patch.object(rh.hooks, '_get_build_os_name', return_value='vapier os')
def testBUILD_OS(self, m):
"""Verify handling of BUILD_OS."""