Example #1
0
 def test_check_consent(self):
     consent, fail = db.check_consent(['000027561', '000001124', '0000000'])
     self.assertEqual(consent, ['000027561'])
     self.assertEqual(fail, {
         '0000000': 'Not an AG barcode',
         '000001124': 'Sample not logged'
     })
 def post(self):
     barcodes = [
         b.strip() for b in self.get_argument('barcodes').split('\n')
     ]
     consents, failures = db.check_consent(barcodes)
     self.render('consent_check.html',
                 consents=sorted(consents),
                 failures=failures)
Example #3
0
 def post(self):
     barcodes = [b.strip() for b in
                 self.get_argument('barcodes').split('\n')]
     consents, failures = db.check_consent(barcodes)
     self.render('consent_check.html', consents=sorted(consents),
                 failures=failures)
Example #4
0
 def test_check_consent(self):
     consent, fail = db.check_consent(["000027561", "000001124", "0000000"])
     self.assertEqual(consent, ["000027561"])
     self.assertEqual(fail, {"0000000": "Not an AG barcode", "000001124": "Sample not logged"})
Example #5
0
 def test_check_consent(self):
     consent, fail = db.check_consent(['000027561', '000001124', '0000000'])
     self.assertEqual(consent, ['000027561'])
     self.assertEqual(fail, {'0000000': 'Not an AG barcode',
                             '000001124': 'Sample not logged'})