コード例 #1
0
ファイル: test_data_access.py プロジェクト: antgonza/labadmin
    def test_get_unconsented(self):
        obs = db.get_unconsented()
        # we don't know the actual number independent of DB version, but we can
        # assume that we have a certain amount of those barcodes.
        self.assertTrue(len(obs) >= 100)

        # we cannot know which barcodes are unconsented without executing the
        # db function itself. Thus, for unit tests, we should only check data
        # types.
        self.assertTrue(obs[0][0].isdigit())
        self.assertTrue(isinstance(obs[0][1], datetime.date))
        self.assertTrue(isinstance(obs[0][2], str))
コード例 #2
0
ファイル: test_data_access.py プロジェクト: tanaes/labadmin
    def test_get_unconsented(self):
        obs = db.get_unconsented()
        # we don't know the actual number independent of DB version, but we can
        # assume that we have a certain amount of those barcodes.
        self.assertTrue(len(obs) >= 100)

        # we cannot know which barcodes are unconsented without executing the
        # db function itself. Thus, for unit tests, we should only check data
        # types.
        self.assertTrue(obs[0][0].isdigit())
        self.assertTrue(isinstance(obs[0][1], datetime.date))
        self.assertTrue(isinstance(obs[0][2], str))
コード例 #3
0
ファイル: test_data_access.py プロジェクト: biocore/labadmin
 def test_get_unconsented(self):
     obs = db.get_unconsented()
     self.assertEqual(len(obs), 433)
     exp = ["000001000", datetime.date(2015, 4, 10), "REMOVED"]
     self.assertEqual(obs[0], exp)
コード例 #4
0
 def test_get_unconsented(self):
     obs = db.get_unconsented()
     self.assertEqual(len(obs), 433)
     exp = ['000001000', datetime.date(2015, 4, 10), 'REMOVED']
     self.assertEqual(obs[0], exp)