mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Removes unused imports from test case
This commit is contained in:
		| @@ -1,29 +1,15 @@ | |||||||
| import os | import os | ||||||
| import shutil |  | ||||||
| from io import StringIO | from io import StringIO | ||||||
| from unittest import mock | from unittest import mock | ||||||
|  |  | ||||||
| from django.contrib.auth.models import User | from django.contrib.auth.models import User | ||||||
| from django.core.management import call_command | from django.core.management import call_command | ||||||
| from django.test import TestCase | from django.test import TestCase | ||||||
| from documents.management.commands.document_thumbnails import _process_document |  | ||||||
| from documents.models import Correspondent |  | ||||||
| from documents.models import Document |  | ||||||
| from documents.models import DocumentType |  | ||||||
| from documents.models import Tag |  | ||||||
| from documents.tests.utils import DirectoriesMixin | from documents.tests.utils import DirectoriesMixin | ||||||
|  |  | ||||||
|  |  | ||||||
| class TestManageSuperUser(DirectoriesMixin, TestCase): | class TestManageSuperUser(DirectoriesMixin, TestCase): | ||||||
|     def reset_environment(self): |     def call_command(self, environ): | ||||||
|         if "PAPERLESS_ADMIN_PASSWORD" in os.environ: |  | ||||||
|             del os.environ["PAPERLESS_ADMIN_PASSWORD"] |  | ||||||
|         if "PAPERLESS_ADMIN_USER" in os.environ: |  | ||||||
|             del os.environ["PAPERLESS_ADMIN_USER"] |  | ||||||
|         if "PAPERLESS_ADMIN_MAIL" in os.environ: |  | ||||||
|             del os.environ["PAPERLESS_ADMIN_MAIL"] |  | ||||||
|  |  | ||||||
|     def call_command(self, environ, *args, **kwargs): |  | ||||||
|         out = StringIO() |         out = StringIO() | ||||||
|         with mock.patch.dict(os.environ, environ): |         with mock.patch.dict(os.environ, environ): | ||||||
|             call_command( |             call_command( | ||||||
| @@ -31,7 +17,6 @@ class TestManageSuperUser(DirectoriesMixin, TestCase): | |||||||
|                 "--no-color", |                 "--no-color", | ||||||
|                 stdout=out, |                 stdout=out, | ||||||
|                 stderr=StringIO(), |                 stderr=StringIO(), | ||||||
|                 **kwargs, |  | ||||||
|             ) |             ) | ||||||
|         return out.getvalue() |         return out.getvalue() | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Trenton Holmes
					Trenton Holmes