# Path: groundwork/plugins/gw_signals_info.py
# class GwSignalsInfo(GwCommandsPattern, GwDocumentsPattern):
#     def __init__(self, *args, **kwargs):
#         self.name = kwargs.get("name", self.__class__.__name__)
#         super(GwSignalsInfo, self).__init__(*args, **kwargs)
# 
#     def activate(self):
#         self.commands.register("signal_list", "List of all signals", self.list_signals)
#         self.commands.register("receiver_list", "List of all signal receivers", self.list_receivers)
# 
#         self.documents.register(name="signals_overview",
#                                 content=signal_content,
#                                 description="Gives an overview about all registered signals")
# 
#         self.documents.register(name="receivers_overview",
#                                 content=receiver_content,
#                                 description="Gives an overview about all registered receivers")
# 
#     def deactivate(self):
#         pass
# 
#     def list_signals(self):
#         """
#         Prints a list of all registered signals. Including description and plugin name.
#         """
#         print("Signal list")
#         print("***********\n")
#         for key, signal in self.app.signals.signals.items():
#             print("%s (%s)\n  %s\n" % (signal.name, signal.plugin.name, signal.description))
# 
#     def list_receivers(self):
#         """
#         Prints a list of all registered receivers. Including signal, plugin name and description.
#         """
#         print("Receiver list")
#         print("*************\n")
#         for key, receiver in self.app.signals.receivers.items():
#             print("%s <-- %s (%s):\n  %s\n" % (receiver.name,
#                                                receiver.signal,
#                                                receiver.plugin.name,
#                                                receiver.description))


from click.testing import CliRunner
from groundwork.plugins import GwSignalsInfo


def test_plugin_activation(basicApp):
    app = basicApp
    plugin = GwSignalsInfo(app)
    plugin.activate()


def test_plugin_deactivation(basicApp):
    app = basicApp
    plugin = GwSignalsInfo(app)
    plugin.activate()
    plugin.deactivate()


def test_plugin_list_signals(emptyApp):
    app = emptyApp

# Path: groundwork/plugins/gw_signals_info.py
# class GwSignalsInfo(GwCommandsPattern, GwDocumentsPattern):
#     def __init__(self, *args, **kwargs):
#         self.name = kwargs.get("name", self.__class__.__name__)
#         super(GwSignalsInfo, self).__init__(*args, **kwargs)
# 
#     def activate(self):
#         self.commands.register("signal_list", "List of all signals", self.list_signals)
#         self.commands.register("receiver_list", "List of all signal receivers", self.list_receivers)
# 
#         self.documents.register(name="signals_overview",
#                                 content=signal_content,
#                                 description="Gives an overview about all registered signals")
# 
#         self.documents.register(name="receivers_overview",
#                                 content=receiver_content,
#                                 description="Gives an overview about all registered receivers")
# 
#     def deactivate(self):
#         pass
# 
#     def list_signals(self):
#         """
#         Prints a list of all registered signals. Including description and plugin name.
#         """
#         print("Signal list")
#         print("***********\n")
#         for key, signal in self.app.signals.signals.items():
#             print("%s (%s)\n  %s\n" % (signal.name, signal.plugin.name, signal.description))
# 
#     def list_receivers(self):
#         """
#         Prints a list of all registered receivers. Including signal, plugin name and description.
#         """
#         print("Receiver list")
#         print("*************\n")
#         for key, receiver in self.app.signals.receivers.items():
#             print("%s <-- %s (%s):\n  %s\n" % (receiver.name,
#                                                receiver.signal,
#                                                receiver.plugin.name,
#                                                receiver.description))


# Path: tests/test_plugin_gw_signals_info.py
from click.testing import CliRunner
from groundwork.plugins import GwSignalsInfo



def test_plugin_activation(basicApp):
    app = basicApp
    plugin = GwSignalsInfo(app)
    plugin.activate()


def test_plugin_deactivation(basicApp):
    app = basicApp
    plugin = GwSignalsInfo(app)
    plugin.activate()
    plugin.deactivate()


def test_plugin_list_signals(emptyApp):
    app = emptyApp

    plugin = GwSignalsInfo(app)