l.s.t.t.t.TestPollingTaskSource(TestCase) : class documentation

Part of lp.services.twistedsupport.tests.test_task View In Hierarchy

Tests for PollingTaskSource.
Method setUp Undocumented
Method makeTaskSource Make a task source for testing.
Method test_provides_ITaskSource Undocumented
Method test_start_commences_polling Undocumented
Method test_noTasksFound_called_when_no_tasks_found Undocumented
Method test_start_continues_polling Undocumented
Method test_stop_stops_polling Undocumented
Method test_stop_deferred_fires_immediately_if_no_polling Undocumented
Method test_start_multiple_times_polls_immediately Undocumented
Method test_start_multiple_times_resets_polling_loop Undocumented
Method test_starting_again_changes_consumer Undocumented
Method test_task_consumer_not_called_when_factory_doesnt_produce Undocumented
Method test_stop_without_start Undocumented
Method test_stop_multiple_times Undocumented
Method test_producer_returns_deferred Undocumented
Method test_only_one_producer_call_at_once Undocumented
Method test_stop_deferred_doesnt_fire_until_polling_finished Undocumented
Method test_stop_deferred_fires_with_false_if_source_restarted Undocumented
Method test_stop_start_stop_when_polling_doesnt_poll_again Undocumented
Method test_taskStarted_deferred_doesnt_delay_polling Undocumented
Method test_producer_errors_call_taskProductionFailed Undocumented
Method test_taskProductionFailed_deferred_doesnt_delay_polling Undocumented
Method _default_task_producer Producer that records the number of times it has been called.

Inherited from TestCase:

Method becomeDbUser Commit, then log into the database as dbuser.
Method __str__ The string representation of a test is its id.
Method useContext Use the supplied context in this test.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method installKarmaRecorder Set up and return a KarmaRecorder.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertTextMatchesExpressionIgnoreWhitespace Undocumented
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method assertVectorEqual Apply assertEqual to all given pairs in one go.
Method expectedLog Expect a log to be written that matches the regex.
Method pushConfig Push some key-value pairs into a section of the config.
Method attachOopses Undocumented
Method attachLibrarianLog Include the logChunks from fixture in the test details.
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
Method assertEmailHeadersEqual Assert that two email headers are equal.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method checkPermissions Check if the used_permissions match expected_permissions.
Method assertEmailQueueLength Pop the email queue, assert its length, and return it.
Method _unfoldEmailHeader Unfold a multiline email header.
def setUp(self):
Undocumented
def _default_task_producer(self):
Producer that records the number of times it has been called.
ReturnsNone, indicating that there are no tasks to do right now.
def makeTaskSource(self, task_producer=None, interval=None, clock=None):
Make a task source for testing.
Parameterstask_producerThe producer of tasks. Defaults to a producer that returns None and increments a count of the number of times it has been called.
intervalThe interval between polls. Defaults to an arbitrary integer.
clockThe clock to use for measuring the interval. Defaults to an instance of Clock.
ReturnsA PollingTaskSource.
def test_provides_ITaskSource(self):
Undocumented
def test_start_commences_polling(self):
Undocumented
def test_noTasksFound_called_when_no_tasks_found(self):
Undocumented
def test_start_continues_polling(self):
Undocumented
def test_stop_stops_polling(self):
Undocumented
def test_stop_deferred_fires_immediately_if_no_polling(self):
Undocumented
def test_start_multiple_times_polls_immediately(self):
Undocumented
def test_start_multiple_times_resets_polling_loop(self):
Undocumented
def test_starting_again_changes_consumer(self):
Undocumented
def test_task_consumer_not_called_when_factory_doesnt_produce(self):
Undocumented
def test_stop_without_start(self):
Undocumented
def test_stop_multiple_times(self):
Undocumented
def test_producer_returns_deferred(self):
Undocumented
def test_only_one_producer_call_at_once(self):
Undocumented
def test_stop_deferred_doesnt_fire_until_polling_finished(self):
Undocumented
def test_stop_deferred_fires_with_false_if_source_restarted(self):
Undocumented
def test_stop_start_stop_when_polling_doesnt_poll_again(self):
Undocumented
def test_taskStarted_deferred_doesnt_delay_polling(self):
Undocumented
def test_producer_errors_call_taskProductionFailed(self):
Undocumented
def test_taskProductionFailed_deferred_doesnt_delay_polling(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.