original_docstring: 
      All started daemons will forward their events into an instance of
      :py:class:`~saltfactories.plugins.event_listener.EventListener`.
  
      This fixture can be used to wait for events:
  
      .. code-block:: python
  
          def test_send(event_listener, salt_master, salt_minion, salt_call_cli):
              event_tag = random_string("salt/test/event/")
              data = {"event.fire": "just test it!!!!"}
              start_time = time.time()
              ret = salt_call_cli.run("event.send", event_tag, data=data)
              assert ret.exitcode == 0
              assert ret.json
              assert ret.json is True
  
              event_pattern = (salt_master.id, event_tag)
              matched_events = event_listener.wait_for_events(
                  [event_pattern], after_time=start_time, timeout=30
              )
              assert matched_events.found_all_events
              # At this stage, we got all the events we were waiting for
  
  
      And assert against those events events:
  
      .. code-block:: python
  
          def test_send(event_listener, salt_master, salt_minion, salt_call_cli):
              # ... check the example above for the initial code ...
              assert matched_events.found_all_events
              # At this stage, we got all the events we were waiting for
              for event in matched_events:
                  assert event.data["id"] == salt_minion.id
                  assert event.data["cmd"] == "_minion_event"
                  assert "event.fire" in event.data["data"]
      
docstring: All started daemons will forward their events into an instance of
docstring_tokens: All started daemons will forward their events into an instance of
code: def event_listener(request):
      """
      All started daemons will forward their events into an instance of
      :py:class:`~saltfactories.plugins.event_listener.EventListener`.
  
      This fixture can be used to wait for events:
  
      .. code-block:: python
  
          def test_send(event_listener, salt_master, salt_minion, salt_call_cli):
              event_tag = random_string("salt/test/event/")
              data = {"event.fire": "just test it!!!!"}
              start_time = time.time()
              ret = salt_call_cli.run("event.send", event_tag, data=data)
              assert ret.exitcode == 0
              assert ret.json
              assert ret.json is True
  
              event_pattern = (salt_master.id, event_tag)
              matched_events = event_listener.wait_for_events(
                  [event_pattern], after_time=start_time, timeout=30
              )
              assert matched_events.found_all_events
              # At this stage, we got all the events we were waiting for
  
  
      And assert against those events events:
  
      .. code-block:: python
  
          def test_send(event_listener, salt_master, salt_minion, salt_call_cli):
              # ... check the example above for the initial code ...
              assert matched_events.found_all_events
              # At this stage, we got all the events we were waiting for
              for event in matched_events:
                  assert event.data["id"] == salt_minion.id
                  assert event.data["cmd"] == "_minion_event"
                  assert "event.fire" in event.data["data"]
      """
      return request.config.pluginmanager.get_plugin("saltfactories-event-listener")
code_tokens: def event_listener ( request ) : return request . config . pluginmanager . get_plugin ( "saltfactories-event-listener" )
short_docstring: All started daemons will forward their events into an instance of
short_docstring_tokens: All started daemons will forward their events into an instance of
comment: """
      All started daemons will forward their events into an instance of
      :py:class:`~saltfactories.plugins.event_listener.EventListener`.
  
      This fixture can be used to wait for events:
  
      .. code-block:: python
  
          def test_send(event_listener, salt_master, salt_minion, salt_call_cli):
              event_tag = random_string("salt/test/event/")
              data = {"event.fire": "just test it!!!!"}
              start_time = time.time()
              ret = salt_call_cli.run("event.send", event_tag, data=data)
              assert ret.exitcode == 0
              assert ret.json
              assert ret.json is True
  
              event_pattern = (salt_master.id, event_tag)
              matched_events = event_listener.wait_for_events(
                  [event_pattern], after_time=start_time, timeout=30
              )
              assert matched_events.found_all_events
              # At this stage, we got all the events we were waiting for
  
  
      And assert against those events events:
  
      .. code-block:: python
  
          def test_send(event_listener, salt_master, salt_minion, salt_call_cli):
              # ... check the example above for the initial code ...
              assert matched_events.found_all_events
              # At this stage, we got all the events we were waiting for
              for event in matched_events:
                  assert event.data["id"] == salt_minion.id
                  assert event.data["cmd"] == "_minion_event"
                  assert "event.fire" in event.data["data"]
      """