Ejemplo n.º 1
0
    def handle(self, *args, **options):
        '''
        Handle command
        '''

        if args is None or len(args) != 1:
            raise CommandError(_('You must supply a key'))

        try:
            key = args[0]
        except IndexError:
            print(_('Error in usage. See help'))
            sys.exit(1)

        es = search(key)
        populate_tickets(es, options['closed'])
Ejemplo n.º 2
0
 def test_populate_tickets(self):
     self.assertEqual(populate_tickets(search(str(self.server2.rack.pk))).count(), 2)