Skip to content

Commit cb7f153

Browse files
committed
Refactor test_auto_encryption_opts
1 parent 3432818 commit cb7f153

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/encryption_/tests.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from django.core import management
1+
from io import StringIO
2+
3+
from django.core.management import call_command
24
from django.db import connections
35
from django.test import TestCase, modify_settings, override_settings
46

@@ -40,4 +42,6 @@ def test_encrypted_fields_map(self):
4042
)
4143

4244
def test_auto_encryption_opts(self):
43-
management.call_command("get_encrypted_fields_map", "--database", "encrypted", verbosity=0)
45+
out = StringIO()
46+
call_command("get_encrypted_fields_map", "--database", "encrypted", verbosity=0, stdout=out)
47+
self.assertIn("fields", out.getvalue())

0 commit comments

Comments
 (0)