mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Suppress output when running rebuild_references_index in tests
This commit is contained in:
parent
c8689acb37
commit
5c3fb13335
@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
import json
|
||||
from io import StringIO
|
||||
from unittest import mock
|
||||
|
||||
from django.contrib.admin.utils import quote
|
||||
@ -2803,7 +2804,8 @@ class TestSnippetDelete(TestCase, WagtailTestUtils):
|
||||
self.assertEqual(Advert.objects.filter(text="test_advert").count(), 0)
|
||||
|
||||
def test_usage_link(self):
|
||||
management.call_command("rebuild_references_index")
|
||||
output = StringIO()
|
||||
management.call_command("rebuild_references_index", stdout=output)
|
||||
|
||||
response = self.client.get(
|
||||
reverse(
|
||||
@ -3047,7 +3049,8 @@ class TestUsageCount(TestCase):
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
super().setUpTestData()
|
||||
management.call_command("rebuild_references_index")
|
||||
output = StringIO()
|
||||
management.call_command("rebuild_references_index", stdout=output)
|
||||
|
||||
def test_snippet_usage_count(self):
|
||||
advert = Advert.objects.get(pk=1)
|
||||
@ -3060,7 +3063,8 @@ class TestUsedBy(TestCase):
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
super().setUpTestData()
|
||||
management.call_command("rebuild_references_index")
|
||||
output = StringIO()
|
||||
management.call_command("rebuild_references_index", stdout=output)
|
||||
|
||||
def test_snippet_used_by(self):
|
||||
advert = Advert.objects.get(pk=1)
|
||||
|
Loading…
Reference in New Issue
Block a user