def setUp(self): auth_method_config = { "config": Email.CONFIG, "pipeline": Email.PIPELINES } ae = AuthEvent(auth_method=test_data.auth_event9['auth_method'], auth_method_config=auth_method_config, extra_fields=test_data.auth_event9['extra_fields'], status='started', census=test_data.auth_event9['census']) ae.save() self.aeid = ae.pk # Create user for authevent9 u = User(username='******', email='', is_active=False) u.save() u.userdata.event = ae u.userdata.metadata = { 'email': '', 'email_verified': True, 'match_field': 'match_code_555' } u.userdata.save() self.userid = u.pk acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=ae.pk) acl.save() code = Code(user=u.userdata, code='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', auth_event_id=ae.pk) code.save()
def setUp(self): auth_method_config = test_data.authmethod_config_sms_default ae = AuthEvent(auth_method=test_data.auth_event2['auth_method'], auth_method_config=auth_method_config, extra_fields=test_data.auth_event2['extra_fields'], status='started', census=test_data.auth_event2['census']) ae.save() self.aeid = ae.pk u = User(pk=1, username='******', email='*****@*****.**') u.save() u.userdata.event = ae u.userdata.tlf = '+34666666666' u.userdata.metadata = json.dumps({'dni': '11111111H'}) u.userdata.save() self.u = u.userdata code = Code(user=u.userdata, code='AAAAAAAA', auth_event_id=ae.pk) code.save() m = Message(tlf=u.userdata.tlf, auth_event_id=ae.pk) m.save() u2 = User(pk=2, username='******', email='*****@*****.**') u2.is_active = False u2.save() u2.userdata.tlf = '+34766666666' u2.userdata.event = ae u2.userdata.metadata = json.dumps({'dni': '11111111H'}) u2.userdata.save() code = Code(user=u2.userdata, code='AAAAAAAA', auth_event_id=ae.pk) code.save() self.c = JClient()
def setUp(self): ae = AuthEvent( auth_method="email", auth_method_config=test_data.authmethod_config_email_default, extra_fields=test_data.ae_email_fields_captcha['extra_fields'], status='started', census="open") ae.save() self.ae = ae self.aeid = ae.pk u = User(username='******', email=test_data.auth_email_default['email']) u.save() u.userdata.event = ae u.userdata.save() acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=self.aeid) acl.save() c = Code(user=u.userdata, code=test_data.auth_email_default['code'], auth_event_id=self.aeid) c.save() self.code = c
def setUp(self): ae = AuthEvent( auth_method="email", auth_method_config=test_data.authmethod_config_email_default, extra_fields=test_data.ae_email_fields_captcha['extra_fields'], status='started', census="open") ae.save() self.ae = ae self.aeid = ae.pk u_admin = User(username=test_data.admin['username']) u_admin.set_password(test_data.admin['password']) u_admin.save() u_admin.userdata.event = ae u_admin.userdata.save() acl = ACL(user=u_admin.userdata, object_type='AuthEvent', perm='edit', object_id=self.aeid) acl.save() acl = ACL(user=u_admin.userdata, object_type='AuthEvent', perm='create', object_id=0) acl.save()
def setUp(self): auth_method_config = test_data.authmethod_config_sms_default ae = AuthEvent(auth_method=test_data.auth_event2['auth_method'], auth_method_config=auth_method_config, extra_fields=test_data.auth_event2['extra_fields'], status='started', census=test_data.auth_event2['census']) ae.save() self.aeid = ae.pk u = User(username='******', email='*****@*****.**') u.save() u.userdata.event = ae u.userdata.tlf = '+34666666666' u.userdata.metadata = { 'dni': '11111111H' } u.userdata.save() self.u = u.userdata code = Code(user=u.userdata, code='AAAAAAAA', auth_event_id=ae.pk) code.save() m = Message(tlf=u.userdata.tlf, auth_event_id=ae.pk) m.save() u2 = User(email='*****@*****.**') u2.is_active = False u2.save() u2.userdata.tlf = '+34766666666' u2.userdata.event = ae u2.userdata.metadata = { 'dni': '11111111H' } u2.userdata.save() code = Code(user=u2.userdata, code='AAAAAAAA', auth_event_id=ae.pk) code.save() self.c = JClient()
def setUp(self): auth_method_config = { "config": Email.CONFIG, "pipeline": Email.PIPELINES } ae = AuthEvent(auth_method=test_data.auth_event7['auth_method'], auth_method_config=auth_method_config, extra_fields=test_data.auth_event7['extra_fields'], status='started', census=test_data.auth_event7['census']) ae.save() self.aeid = ae.pk
def setUp(self): ae = AuthEvent(auth_method=test_data.auth_event4['auth_method'], status='started', census=test_data.auth_event4['census']) ae.save() self.aeid = ae.pk u = User(pk=1, username=test_data.pwd_auth['username']) u.set_password(test_data.pwd_auth['password']) u.save() u.userdata.event = ae u.userdata.save() self.userid = u.pk
def setUp(self): ae = AuthEvent(auth_method=test_data.auth_event4['auth_method'], status='started', census=test_data.auth_event4['census'], auth_method_config=test_data.authmethod_config_email_default) ae.save() self.aeid = ae.pk u = User(email=test_data.pwd_auth['email']) u.set_password(test_data.pwd_auth['password']) u.save() u.userdata.event = ae u.userdata.save() self.userid = u.pk
def setUp(self): ae = AuthEvent( auth_method=test_data.auth_event4['auth_method'], status='started', census=test_data.auth_event4['census'], auth_method_config=test_data.authmethod_config_email_default) ae.save() self.aeid = ae.pk u = User(pk=1, email=test_data.pwd_auth['email']) u.set_password(test_data.pwd_auth['password']) u.save() u.userdata.event = ae u.userdata.save() self.userid = u.pk
def setUp(self): auth_method_config = test_data.authmethod_config_email_default ae = AuthEvent(auth_method=test_data.auth_event3['auth_method'], auth_method_config=auth_method_config, status='started', census=test_data.auth_event3['census']) ae.save() self.aeid = ae.pk u = User(pk=1, username='******', email='*****@*****.**') u.save() u.userdata.event = ae u.userdata.metadata = json.dumps({ 'email': '*****@*****.**', 'code': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'email_verified': True }) u.userdata.save() self.userid = u.pk acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=ae.pk) acl.save() u2 = User(pk=2, username='******') u2.is_active = False u2.save() u2.userdata.event = ae u2.userdata.metadata = json.dumps({ 'email': '*****@*****.**', 'code': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'email_verified': False }) u2.userdata.save() code = Code(user=u.userdata, code='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', auth_event_id=ae.pk) code.save() code = Code(user=u2.userdata, code='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', auth_event_id=ae.pk) code.save()
def setUp(self): auth_method_config = { "config": Email.CONFIG, "pipeline": Email.PIPELINES } ae = AuthEvent(auth_method=test_data.auth_event6['auth_method'], auth_method_config=auth_method_config, extra_fields=test_data.auth_event6['extra_fields'], status='started', census=test_data.auth_event6['census']) ae.save() self.aeid = ae.pk # Create admin user for authevent6 u = User(email='*****@*****.**') u.save() u.userdata.event = ae u.userdata.save() acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=ae.pk) acl.save()
def setUp(self): ae = AuthEvent(auth_method="email", auth_method_config=test_data.authmethod_config_email_default, extra_fields=test_data.ae_email_fields_captcha['extra_fields'], status='started', census="open") ae.save() self.ae = ae self.aeid = ae.pk u = User(username='******', email=test_data.auth_email_default['email']) u.save() u.userdata.event = ae u.userdata.save() acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=self.aeid) acl.save() c = Code(user=u.userdata, code=test_data.auth_email_default['code'], auth_event_id=self.aeid) c.save() self.code = c
def setUp(self): auth_method_config = test_data.authmethod_config_sms_default ae = AuthEvent(auth_method=test_data.auth_event11['auth_method'], auth_method_config=auth_method_config, extra_fields=test_data.auth_event11['extra_fields'], status='started', census=test_data.auth_event11['census']) ae.save() self.aeid = ae.pk # Create user for authevent11 u = User(username='******', email='*****@*****.**', is_active=False) u.save() u.userdata.event = ae u.userdata.tlf = '' u.userdata.metadata = { 'match_field': 'match_code_555' } u.userdata.save() self.userid = u.pk acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=ae.pk) acl.save() code = Code(user=u.userdata, code='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', auth_event_id=ae.pk) code.save()
def setUp(self): ae = AuthEvent(auth_method="email", auth_method_config=test_data.authmethod_config_email_default, extra_fields=test_data.ae_email_fields_captcha['extra_fields'], status='started', census="open") ae.save() self.ae = ae self.aeid = ae.pk u_admin = User(username=test_data.admin['username']) u_admin.set_password(test_data.admin['password']) u_admin.save() u_admin.userdata.event = ae u_admin.userdata.save() acl = ACL(user=u_admin.userdata, object_type='AuthEvent', perm='edit', object_id=self.aeid) acl.save() acl = ACL(user=u_admin.userdata, object_type='AuthEvent', perm='create', object_id=0) acl.save()
def setUp(self): auth_method_config = { "config": Email.CONFIG, "pipeline": Email.PIPELINES } ae = AuthEvent(auth_method=test_data.auth_event6['auth_method'], auth_method_config=auth_method_config, extra_fields=test_data.auth_event6['extra_fields'], status='started', census=test_data.auth_event6['census']) ae.save() self.aeid = ae.pk # Create admin user for authevent6 u = User(username='******', email='*****@*****.**') u.save() u.userdata.event = ae u.userdata.save() acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=ae.pk) acl.save()
def setUp(self): auth_method_config = test_data.authmethod_config_email_default ae = AuthEvent(auth_method=test_data.auth_event3['auth_method'], auth_method_config=auth_method_config, status='started', census=test_data.auth_event3['census']) ae.save() self.aeid = ae.pk u = User(username='******', email='*****@*****.**') u.save() u.userdata.event = ae u.userdata.metadata = { 'email': '*****@*****.**', 'code': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'email_verified': True } u.userdata.save() self.userid = u.pk acl = ACL(user=u.userdata, object_type='AuthEvent', perm='edit', object_id=ae.pk) acl.save() u2 = User(email='*****@*****.**') u2.is_active = False u2.save() u2.userdata.event = ae u2.userdata.metadata = { 'email': '*****@*****.**', 'code': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'email_verified': False } u2.userdata.save() code = Code(user=u.userdata, code='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', auth_event_id=ae.pk) code.save() code = Code(user=u2.userdata, code='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', auth_event_id=ae.pk) code.save()