mirror of
https://github.com/boostorg/website-v2.git
synced 2026-02-26 05:12:11 +00:00
- Add context processor to return most recent version to base template - Add property for the stripped slug - Add context processor to settings and retrieve val in template header - Fix some news tests that test for specific query counts fix tests
13 lines
457 B
Python
13 lines
457 B
Python
from core.context_processors import current_release
|
|
|
|
|
|
def test_current_release_context(
|
|
version, beta_version, inactive_version, old_version, rf
|
|
):
|
|
"""Test the current_release context processor. Making the other versions
|
|
ensures that the most_recent() method returns the correct version."""
|
|
request = rf.get("/")
|
|
context = current_release(request)
|
|
assert "current_release" in context
|
|
assert context["current_release"] == version
|