diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-08-08 15:09:57 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-08-14 16:26:53 +0000 |
commit | b6c7f1eb2c76ac3847d5b6da60b9c31a0a69d875 (patch) | |
tree | 59492ef096d0eeadff46e90513a5901315dda1a7 /morphlib/sysbranchdir_tests.py | |
parent | b2e6814127f12fee3ce9bc5a9f40d20148353c2e (diff) | |
download | morph-b6c7f1eb2c76ac3847d5b6da60b9c31a0a69d875.tar.gz |
Add SystemBranchDirectory.get_filename method
Diffstat (limited to 'morphlib/sysbranchdir_tests.py')
-rw-r--r-- | morphlib/sysbranchdir_tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/morphlib/sysbranchdir_tests.py b/morphlib/sysbranchdir_tests.py index e75122cc..7ee04c7d 100644 --- a/morphlib/sysbranchdir_tests.py +++ b/morphlib/sysbranchdir_tests.py @@ -162,6 +162,15 @@ class SystemBranchDirectoryTests(unittest.TestCase): sb.get_git_directory_name(url), os.path.join(self.root_directory, stripped)) + def test_reports_correct_path_for_file_in_repository(self): + sb = morphlib.sysbranchdir.create( + self.root_directory, + self.root_repository_url, + self.system_branch_name) + self.assertEqual( + sb.get_filename('test:chunk', 'foo'), + os.path.join(self.root_directory, 'test:chunk/foo')) + def test_reports_correct_name_for_git_directory_from_file_url(self): stripped = 'foobar/morphs' url = 'file:///%s.git' % stripped |