mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-13 18:17:02 +01:00
Runs the pre-commit hooks over all the Python files
This commit is contained in:
parent
d3e9799279
commit
1771d18a21
94 changed files with 1638 additions and 991 deletions
|
|
@ -3,7 +3,6 @@ from unittest import mock
|
|||
from django.contrib.admin.sites import AdminSite
|
||||
from django.test import TestCase
|
||||
from django.utils import timezone
|
||||
|
||||
from documents import index
|
||||
from documents.admin import DocumentAdmin
|
||||
from documents.models import Document
|
||||
|
|
@ -42,7 +41,8 @@ class TestDocumentAdmin(DirectoriesMixin, TestCase):
|
|||
docs = []
|
||||
for i in range(42):
|
||||
doc = Document.objects.create(
|
||||
title="Many documents with the same title", checksum=f"{i:02}"
|
||||
title="Many documents with the same title",
|
||||
checksum=f"{i:02}",
|
||||
)
|
||||
docs.append(doc)
|
||||
index.add_or_update_document(doc)
|
||||
|
|
@ -61,6 +61,7 @@ class TestDocumentAdmin(DirectoriesMixin, TestCase):
|
|||
|
||||
def test_created(self):
|
||||
doc = Document.objects.create(
|
||||
title="test", created=timezone.make_aware(timezone.datetime(2020, 4, 12))
|
||||
title="test",
|
||||
created=timezone.make_aware(timezone.datetime(2020, 4, 12)),
|
||||
)
|
||||
self.assertEqual(self.doc_admin.created_(doc), "2020-04-12")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue