def test_update(self): self.assertRegexpMatches(self.test_app_model_id, h.regx_pattern_id()) payload = { "enrollmentRepeats": 3, "threshold": 0, "autoThresholdEnable": False, "autoThresholdClearance": 0, "autoThresholdMaxRise": 0, "useModelUpdate": False, "modelUpdateDailyLimit": 0 } app_model_id = self.am.update(app_model_id=self.test_app_model_id, payload_override=payload) self.assertRegexpMatches(app_model_id, h.regx_pattern_id())
def test_steps(self): p = { "enrollment.wav": h.DummyData.enrollment_wav, "intervals": h.DummyData.enrollment_intervals, } enrollment_id = self.e.steps(payload_update=p) self.assertRegexpMatches(enrollment_id, h.regx_pattern_id())
def test_update(self): test_verification_id = self.v.create() # a valid payload for verification update p = { "verification.wav": h.DummyData.verification_wav_files['boston_chicago_pyramid.wav']['shared_url'], "intervals": h.DummyData.verification_wav_files['boston_chicago_pyramid.wav']['intervals'], } verification_id = self.v.update(test_verification_id, payload_update=p) self.assertRegexpMatches(verification_id, h.regx_pattern_id())
def test_update(self): p = { # a unique username for testing "username": '******' + str(random.random()) + '_alias', "password": '******', "gender": 'M' } c_alias = Consumer(token=temp_token(), payload=p) test_consumer_id = c_alias.create() p = {"password": '******'} consumer = c_alias.update(test_consumer_id, payload_override=p) self.assertRegexpMatches(consumer, h.regx_pattern_id())
def test_update(self): p = { # a unique username for testing "username": '******' + str(random.random()) + '_alias', "password": '******', "gender": 'M' } c_alias = Consumer(token=temp_token(), payload=p) test_consumer_id = c_alias.create() p = { "password": '******' } consumer = c_alias.update(test_consumer_id, payload_override=p) self.assertRegexpMatches(consumer, h.regx_pattern_id())
def test_update(self): test_verification_id = self.v.create() # a valid payload for verification update p = { "verification.wav": h.DummyData.verification_wav_files['boston_chicago_pyramid.wav'] ['shared_url'], "intervals": h.DummyData.verification_wav_files['boston_chicago_pyramid.wav'] ['intervals'], } verification_id = self.v.update(test_verification_id, payload_update=p) self.assertRegexpMatches(verification_id, h.regx_pattern_id())
def test_create(self): """ ------------------------------------------------------------------------------------------------------- NOTE: might want to replace the hardcoded test_app_model_id payload for a fresh app model (apparently the verification create test fails with a new app-model each time or does not work with a old stale app model) p = { "vocabulary": ["boston", "chicago", "pyramid"], "verificationLength": 3, "enrollmentRepeats": 3 } am = AppModel(temp_token(), payload=p) test_app_model_id = am.create() """ verification_id = self.v.create() self.assertRegexpMatches(verification_id, h.regx_pattern_id())
def test_update(self): test_enrollment_id = self.e.create() # a valid payload test p = { "enrollment.wav": h.DummyData.enrollment_wav, "intervals": h.DummyData.enrollment_intervals, } enrollment_id = self.e.update(test_enrollment_id, payload_update=p) self.assertRegexpMatches(enrollment_id, h.regx_pattern_id()) # an invalid payload test p = { "enrollment.wav": h.DummyData.invalid_enrollment_wav, "intervals": h.DummyData.invalid_enrollment_intervals, } status, response = self.e.update(test_enrollment_id, payload_update=p) self.assertEqual(status, 400) self.assertIsNotNone(response)
def test_create(self): self.assertRegexpMatches(self.test_app_model_id, h.regx_pattern_id())
def test_create(self): consumer = self.c.create() self.assertRegexpMatches(consumer, h.regx_pattern_id())
def test_start_task(self): task = self.a.start_task() self.assertIsNotNone(task) self.assertEqual(task.get('taskStatus'), 'started') self.assertRegexpMatches(task.get('taskName'), h.regx_pattern_id())
def test_create(self): enrollment_id = self.e.create() print(enrollment_id) self.assertRegexpMatches(enrollment_id, h.regx_pattern_id())