We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6eeb822 commit a7588efCopy full SHA for a7588ef
1 file changed
tests/test_upload/test_controllers.py
@@ -1,5 +1,4 @@
1
import base64
2
-from functools import wraps
3
from importlib import reload
4
from io import BytesIO
5
from unittest import mock
@@ -12,19 +11,6 @@
12
11
from tests.base import BaseTestCase, MockResponse
13
14
15
-def mock_decorator(f):
16
- """
17
- Passthrough replacement for login_required in unit tests.
18
-
19
- When mock.patch sets side_effect=mock_decorator, Python calls
20
- mock_decorator(f) at decoration time and receives this wrapper,
21
- which skips all authentication logic and delegates directly to f.
22
23
- @wraps(f)
24
- def decorated_function(*args, **kwargs):
25
- return f(*args, **kwargs)
26
- return decorated_function
27
28
class TestControllers(BaseTestCase):
29
"""Test upload-related cases."""
30
0 commit comments