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)
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)
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 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'})