示例#1
0
 def test_upload_from_git(self):
     with self._isolate() as f:
         with self._git_configured():
             dest = join(f, "single_tool")
             self._copy_repo("single_tool", dest)
             shell(" && ".join([
                 "cd %s" % dest,
                 "git init",
                 "git add .",
                 "git commit -m 'initial commit'"
             ]))
             rev = git.rev(None, "single_tool")
             upload_command = [
                 "shed_update", "--force_repository_creation",
                 "git+single_tool/.git"
             ]
             upload_command.extend(self._shed_args())
             self._check_exit_code(upload_command)
             self._verify_single_uploaded(f, ["single_tool"])
             model = self.mock_shed.model
             repo_id = self.repository_by_name("single_tool")["id"]
             message = model._repositories_msg[repo_id][0]
             assert "planemo upload for repository " in message
             assert "repository https://github.com/galaxyproject" in message
             assert rev in message
示例#2
0
 def test_upload_from_git(self):
     with self._isolate() as f:
         with self._git_configured():
             dest = join(f, "single_tool")
             self._copy_repo("single_tool", dest)
             shell(" && ".join([
                 "cd %s" % dest,
                 "git init",
                 "git add .",
                 "git commit -m 'initial commit'"
             ]))
             rev = git.rev(None, "single_tool")
             upload_command = [
                 "shed_update", "--force_repository_creation",
                 "git+single_tool/.git"
             ]
             upload_command.extend(self._shed_args())
             self._check_exit_code(upload_command)
             self._verify_single_uploaded(f, ["single_tool"])
             model = self.mock_shed.model
             repo_id = self.repository_by_name("single_tool")["id"]
             message = model._repositories_msg[repo_id][0]
             assert "planemo upload for repository " in message
             assert "repository https://github.com/galaxyproject" in message
             assert rev in message
示例#3
0
def test_rev():
    with _git_directory() as t:
        rev = git.rev(None, t)
        assert rev == EXPECTED_HELLO_REV, rev