mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Don't print to standard out during a test
This commit is contained in:
parent
5a8e75112f
commit
8687892332
@ -3,6 +3,7 @@ import os
|
||||
import magic
|
||||
|
||||
from hashlib import md5
|
||||
from unittest import mock
|
||||
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
@ -27,7 +28,8 @@ class TestMessage(TestCase):
|
||||
|
||||
with open(self.sample, "rb") as f:
|
||||
|
||||
message = Message(f.read())
|
||||
with mock.patch("logging.StreamHandler.emit") as __:
|
||||
message = Message(f.read())
|
||||
|
||||
self.assertTrue(message)
|
||||
self.assertEqual(message.subject, "Test 0")
|
||||
|
Loading…
x
Reference in New Issue
Block a user