示例#1
0
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()
示例#2
0
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()
示例#3
0
    def handle(self, *args, **options):
        """Runs command."""
        logger.debug("Starting processor...")

        try:
            AnalysisManager().run()
        except KeyboardInterrupt:
            print("Exiting... (requested by user)")
示例#4
0
 def setUp(self):
     self.am = AnalysisManager()
示例#5
0
 def setUp(self):
     self.am = AnalysisManager()