Ejemplo n.º 1
0
class JobDbEmptyDatasetTestCase(unittest.TestCase):
    def setUp(self):
        # mock job session
        self.session = initTestingDB(dataset=None)
        self.job = JobDb(self.session)

    def test_runInfo(self):
        runInfo = self.job.runInfo()
        self.assertIsNone(runInfo)

    def test_maxMSLevel(self):
        maxmslevel = self.job.maxMSLevel()
        self.assertEqual(maxmslevel, 0)

    def test_chromatogram(self):
        expected_chromatogram = {"scans": [], "cutoff": None}
        self.assertEqual(self.job.chromatogram(), expected_chromatogram)

    def test_moleculesTotalCount(self):
        self.assertEqual(self.job.moleculesTotalCount(), 0)
Ejemplo n.º 2
0
class JobDbEmptyDatasetTestCase(unittest.TestCase):

    def setUp(self):
        # mock job session
        self.session = initTestingDB(dataset=None)
        self.job = JobDb(self.session)

    def test_runInfo(self):
        runInfo = self.job.runInfo()
        self.assertIsNone(runInfo)

    def test_maxMSLevel(self):
        maxmslevel = self.job.maxMSLevel()
        self.assertEqual(maxmslevel, 0)

    def test_chromatogram(self):
        expected_chromatogram = {'scans': [], 'cutoff': None}
        self.assertEqual(self.job.chromatogram(), expected_chromatogram)

    def test_moleculesTotalCount(self):
        self.assertEqual(self.job.moleculesTotalCount(), 0)