Example #1
0
 def test_levels(self):
     """
     Include the task level in the task name.
     """
     self.assertThat(
         task_name(nested_action_task),
         Equals(u'app:action:nest@1,1/started'))
Example #2
0
 def test_none(self):
     """
     Cannot create a task name for ``None``.
     """
     self.assertThat(
         lambda: task_name(None),
         raises(ValueError))
Example #3
0
 def test_levels(self):
     """
     Include the task level in the task name.
     """
     self.assertThat(
         task_name(nested_action_task),
         Equals(u'app:action:nested@1,1/started'))
Example #4
0
 def test_none(self):
     """
     Cannot create a task name for ``None``.
     """
     self.assertThat(
         lambda: task_name(None),
         raises(ValueError))
Example #5
0
 def test_no_action_type(self):
     """
     If the task does not include either a ``message_type`` or an
     ``action_type`` key, then return None.
     """
     self.assertThat(
         task_name(unnamed_message),
         Is(None))
Example #6
0
 def test_no_message_type(self):
     """
     If the task does not include a ``message_type`` key use the
     ``action_type`` and ``action_status`` keys to construct a name.
     """
     self.assertThat(
         task_name(action_task),
         Equals(u'app:action@1/started'))
Example #7
0
 def test_message_type(self):
     """
     If the task includes a ``message_type`` key use it to construct the
     name.
     """
     self.assertThat(
         task_name(message_task),
         Equals(u'twisted:log@1'))
Example #8
0
 def test_no_action_type(self):
     """
     If the task does not include either a ``message_type`` or an
     ``action_type`` key, then return None.
     """
     self.assertThat(
         task_name(unnamed_message),
         Is(None))
Example #9
0
 def test_no_message_type(self):
     """
     If the task does not include a ``message_type`` key use the
     ``action_type`` and ``action_status`` keys to construct a name.
     """
     self.assertThat(
         task_name(action_task),
         Equals(u'app:action@1/started'))
Example #10
0
 def test_message_type(self):
     """
     If the task includes a ``message_type`` key use it to construct the
     name.
     """
     self.assertThat(
         task_name(message_task),
         Equals(u'twisted:log@1'))