# HG changeset patch # User Mads Kiilerich # Date 2020-01-07 12:41:33 # Node ID 9d1d00c72e61aaee24ce7adc6d6684a58f32de82 # Parent 2837b66f68bb158a3f90acfdbd32f98b22d2ccf2 py3: fix error in template from introducing safe_unicode in 9203621cae03 Add missing test coverage of actual edit form. diff --git a/kallithea/templates/files/files_edit.html b/kallithea/templates/files/files_edit.html --- a/kallithea/templates/files/files_edit.html +++ b/kallithea/templates/files/files_edit.html @@ -59,7 +59,7 @@ ${self.repo_context_bar('files')}
- +
diff --git a/kallithea/tests/functional/test_files.py b/kallithea/tests/functional/test_files.py --- a/kallithea/tests/functional/test_files.py +++ b/kallithea/tests/functional/test_files.py @@ -480,6 +480,15 @@ class TestFilesController(TestController response = self.app.get(url('files_edit_home', repo_name=HG_REPO, revision='tip', f_path='vcs/nodes.py')) + # Odd error when on tip ... + self.checkSessionFlash(response, "You can only edit files with revision being a valid branch") + assert "Commit Message" not in response.body + + # Specify branch head revision to avoid "valid branch" error and get coverage of edit form + response = self.app.get(url('files_edit_home', + repo_name=HG_REPO, + revision='96507bd11ecc815ebc6270fdf6db110928c09c1e', f_path='vcs/nodes.py')) + assert "Commit Message" in response.body def test_edit_file_view_not_on_branch_hg(self): self.log_user()