class AnalysisManagerTest(TestCase): def setUp(self): self.am = AnalysisManager() def test_parallelism_positive(self): """Parallelism should be always greater than 0.""" self.assertGreater(self.am.get_parallelism(), 0) def test_parallelism_sqlite(self): """Parallelism should be always greater than 0.""" settings.DATABASES["default"]["ENGINE"] = "sqlite3" self.assertEqual(self.am.get_parallelism(), 1) def tearDown(self): self.am.stop()
def handle(self, *args, **options): """Runs command.""" logger.debug("Starting processor...") try: AnalysisManager().run() except KeyboardInterrupt: print("Exiting... (requested by user)")
def setUp(self): self.am = AnalysisManager()