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:
Sunil Mohan Adapa 2020-06-23 20:45:55 -07:00 committed by James Valleroy
parent 8d2c33bf71
commit 40663b7b5a
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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/'