Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hub: do not insert extra newlines to logs on page reloads #250

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions kobo/hub/templates/task/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@
<h2>{% trans 'Task' %} #{{ task.id }} - {{ log_name }}</h2>
<a href="{% url 'task/detail' task.id %}">{% trans "back to task" %} #{{ task.id }}</a><br />
<a href="?format=raw">{% trans 'download' %}</a>
<pre class="log" id="log">
{{ content }}
</pre>

<pre class="log" id="log">{{ content }}</pre>
{% endblock %}
4 changes: 2 additions & 2 deletions tests/test_view_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def test_view_html_wrapped(self):
# The response is expected to be wrapped in some view.
# We are only doing a very basic verification of the view here
self.assertTrue(content.startswith('<!DOCTYPE html'))
self.assertTrue((small_log_content() + "\n</pre>") in content, content)
self.assertTrue((small_log_content() + "</pre>") in content, content)

# No trimming necessary
self.assertFalse('...trimmed, download required for full log' in content)
Expand All @@ -210,7 +210,7 @@ def test_view_tiny_html_wrapped(self):
)

self.assertTrue(content.startswith('<!DOCTYPE html'))
self.assertTrue((tiny_log_content() + "\n</pre>") in content, content)
self.assertTrue((tiny_log_content() + "</pre>") in content, content)
self.assertFalse('...trimmed, download required for full log' in content)

@profile
Expand Down
Loading