Example #1
0
 def test_with_app(self):
     app = Celery()
     report = bugreport(app)
     self.assertFalse('Unknown Celery version' in report)
     self.assertTrue('tornado' in report)
     self.assertTrue('humanize' in report)
     self.assertTrue('celery' in report)
Example #2
0
 def test_with_app(self):
     app = Celery()
     report = bugreport(app)
     self.assertFalse('Error when generating bug report' in report)
     self.assertTrue('tornado' in report)
     self.assertTrue('humanize' in report)
     self.assertTrue('celery' in report)
Example #3
0
 def test_with_app(self):
     app = Celery()
     report = bugreport(app)
     self.assertFalse('Unknown Celery version' in report)
     self.assertTrue('tornado' in report)
     self.assertTrue('babel' in report)
     self.assertTrue('celery' in report)
    def early_version(self, argv):
        if '--version' in argv:
            if '--debug' in argv:
                from flower.utils import bugreport
                print(bugreport(), file=self.stdout)

            print(__version__, file=self.stdout)
            super(FlowerCommand, self).early_version(argv)
Example #5
0
def main():
    try:
        flower = FlowerCommand()
        flower.execute_from_commandline(argv=[__name__, '-A maestro.app', '--port=20000', '--address=127.0.0.1'])
    except:
        import sys
        print(bugreport(app=flower.app), file=sys.stderr)
        raise
Example #6
0
def main():
    try:
        flower_e = FlowerExCommand()
        flower_e.execute_from_commandline()
    except:
        import sys
        print(bugreport(app=flower_e.app), file=sys.stderr)
        raise
Example #7
0
def main():
    try:
        flower = FlowerCommand()
        flower.execute_from_commandline()
    except Exception:
        import sys
        print(bugreport(app=flower.app), file=sys.stderr)
        raise
Example #8
0
def main():
    try:
        flower = FlowerCommand()
        flower.execute_from_commandline()
    except:
        import sys
        print(bugreport(), file=sys.stderr)
        raise
Example #9
0
 def test_when_unable_to_generate_report(self):
     fake_app = Mock()
     fake_app.bugreport.side_effect = ImportError('import error message')
     report = bugreport(fake_app)
     self.assertTrue('Error when generating bug report' in report)
     self.assertTrue('import error message' in report)
     self.assertTrue(
         "Have you installed correct versions of Flower's dependencies?" in
         report)
Example #10
0
def main():
    try:
        import sys
        if "--multi-celery" in sys.argv:
            flower = MultiFlowerCommand()
        else:
            flower = FlowerCommand()
        flower.execute_from_commandline()
    except:
        import sys
        print(bugreport(app=flower.app), file=sys.stderr)
        raise
Example #11
0
 def test_default(self):
     report = bugreport()
     self.assertFalse('Unknown Celery version' in report)
     self.assertTrue('tornado' in report)
     self.assertTrue('humanize' in report)
     self.assertTrue('celery' in report)
Example #12
0
 def test_default(self):
     report = bugreport()
     self.assertFalse('Error when generating bug report' in report)
     self.assertTrue('tornado' in report)
     self.assertTrue('humanize' in report)
     self.assertTrue('celery' in report)
Example #13
0
 def test_default(self):
     report = bugreport()
     self.assertFalse('Unknown Celery version' in report)
     self.assertTrue('tornado' in report)
     self.assertTrue('babel' in report)
     self.assertTrue('celery' in report)