mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
context_processor: tests: Use already available config fixture
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
8d2c33bf71
commit
40663b7b5a
@ -8,7 +8,6 @@ from unittest.mock import MagicMock, Mock, patch
|
||||
import pytest
|
||||
from django.http import HttpRequest
|
||||
|
||||
from plinth import cfg
|
||||
from plinth import context_processors as cp
|
||||
from plinth import menu as menu_module
|
||||
|
||||
@ -20,9 +19,8 @@ def fixture_menu():
|
||||
|
||||
|
||||
@patch('plinth.notification.Notification')
|
||||
def test_common(Notification):
|
||||
def test_common(Notification, load_cfg):
|
||||
"""Verify that the common() function returns the correct values."""
|
||||
cfg.read() # initialize config settings
|
||||
|
||||
request = HttpRequest()
|
||||
request.path = '/aaa/bbb/ccc/'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user