Everybody could see the full list of public docs. Now only members can see their public docs. They can still access to any specific public doc.
19 lines
379 B
Python
19 lines
379 B
Python
"""Fixtures for tests in the impress core application"""
|
|
|
|
from unittest import mock
|
|
|
|
import pytest
|
|
|
|
USER = "user"
|
|
TEAM = "team"
|
|
VIA = [USER, TEAM]
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_user_teams():
|
|
"""Mock for the "teams" property on the User model."""
|
|
with mock.patch(
|
|
"core.models.User.teams", new_callable=mock.PropertyMock
|
|
) as mock_teams:
|
|
yield mock_teams
|