
from fedmsg.meta.base import BaseProcessor


class TPSProcessor(BaseProcessor):
    topic_prefix_re = r'/topic/VirtualTopic\.eng'

    __name__ = 'tps'

    def title(self, msg, **config):
        return msg['topic'].split('.', 2)[-1]

    def packages(self, msg, **config):
        return set([msg['headers']['component'].rsplit('-', 2)[0]])


from fedmsg.meta.base import BaseProcessor


class TPSProcessor(BaseProcessor):
    topic_prefix_re = r'/topic/VirtualTopic\.eng'

    __name__ = 'tps'
    __description__ = 'package sanity testing of brew builds'
    __obj__ = 'Test Package Sanity'
    __docs__ = 'https://mojo.redhat.com/docs/DOC-0000000'
    __link__ = 'https://sometpslink.engineering.redhat.com'

    def title(self, msg, **config):
        return msg['topic'].split('.', 2)[-1]

    def packages(self, msg, **config):
        return set([msg['headers']['component'].rsplit('-', 2)[0]])

Add missing attributes in TPSProcessor.
Add missing attributes in TPSProcessor.

Signed-off-by: shanks <4508bc7244505cbe28c7ec6ff0c99c8246ca3de6@redhat.com>

  
  from fedmsg.meta.base import BaseProcessor
  
  
  class TPSProcessor(BaseProcessor):
      topic_prefix_re = r'/topic/VirtualTopic\.eng'
  
      __name__ = 'tps'
+     __description__ = 'package sanity testing of brew builds'
+     __obj__ = 'Test Package Sanity'
+     __docs__ = 'https://mojo.redhat.com/docs/DOC-0000000'
+     __link__ = 'https://sometpslink.engineering.redhat.com'
  
      def title(self, msg, **config):
          return msg['topic'].split('.', 2)[-1]
  
      def packages(self, msg, **config):
          return set([msg['headers']['component'].rsplit('-', 2)[0]])
  
Add missing attributes in TPSProcessor.
## Code Before:

from fedmsg.meta.base import BaseProcessor


class TPSProcessor(BaseProcessor):
    topic_prefix_re = r'/topic/VirtualTopic\.eng'

    __name__ = 'tps'

    def title(self, msg, **config):
        return msg['topic'].split('.', 2)[-1]

    def packages(self, msg, **config):
        return set([msg['headers']['component'].rsplit('-', 2)[0]])

## Instruction:
Add missing attributes in TPSProcessor.
## Code After:

from fedmsg.meta.base import BaseProcessor


class TPSProcessor(BaseProcessor):
    topic_prefix_re = r'/topic/VirtualTopic\.eng'

    __name__ = 'tps'
    __description__ = 'package sanity testing of brew builds'
    __obj__ = 'Test Package Sanity'
    __docs__ = 'https://mojo.redhat.com/docs/DOC-0000000'
    __link__ = 'https://sometpslink.engineering.redhat.com'

    def title(self, msg, **config):
        return msg['topic'].split('.', 2)[-1]

    def packages(self, msg, **config):
        return set([msg['headers']['component'].rsplit('-', 2)[0]])
