MCPcopy
hub / github.com/django/django / test_serialize_progressbar

Method test_serialize_progressbar

tests/serializers/tests.py:252–264  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

250 self.assertEqual(objs[0].object.name, unicode_name)
251
252 def test_serialize_progressbar(self):
253 fake_stdout = StringIO()
254 serializers.serialize(
255 self.serializer_name,
256 Article.objects.all(),
257 progress_output=fake_stdout,
258 object_count=Article.objects.count(),
259 )
260 self.assertTrue(
261 fake_stdout.getvalue().endswith(
262 "[" + "." * ProgressBar.progress_width + "]\n"
263 )
264 )
265
266 def test_serialize_superfluous_queries(self):
267 """Ensure no superfluous queries are made when serializing ForeignKeys

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.45
allMethod · 0.45
countMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected