def test_len(self, length: int) -> None:
"""
Tests that the length of the job set is whatever the number of
entries in the SQL query backing this job says it is.
.. note::
For some reason, ``unittest.mock`` won't let me set an integer
bigger than the ``max_value`` specified in this test as a return
value. Because of that, the max value on the integers needs to
be constrained.
:param length: A randomly-generated length
"""
self.root_query.count = mock.MagicMock(return_value=length)
self.assertEqual(length, len(self.job_list))
评论列表
文章目录