475 |
475 |
entity_id='http://provider.com',
|
476 |
476 |
protocol_conformance=lasso.PROTOCOL_SAML_2_0)
|
477 |
477 |
with patch('hobo.agent.authentic2.provisionning.notify_agents') as notify_agents:
|
478 |
|
call_command('createsuperuser', domain=tenant.domain_url, uuid='coin',
|
|
478 |
call_command('createsuperuser', domain=tenant.domain_url,
|
479 |
479 |
username='coin', email='coin@coin.org', interactive=False)
|
480 |
480 |
assert notify_agents.call_count == 1
|
481 |
481 |
|
... | ... | |
549 |
549 |
entity_id='http://example.com',
|
550 |
550 |
protocol_conformance=lasso.PROTOCOL_SAML_2_0)
|
551 |
551 |
with patch('hobo.agent.authentic2.provisionning.notify_agents') as notify_agents:
|
552 |
|
call_command('createsuperuser', domain=tenant.domain_url, uuid='coin',
|
|
552 |
call_command('createsuperuser', domain=tenant.domain_url,
|
553 |
553 |
username='coin', email='coin@coin.org', interactive=False)
|
554 |
554 |
assert notify_agents.call_count == 1
|
555 |
555 |
assert set(notify_agents.call_args[0][0]['audience']) == {'http://example.org', 'http://example.com'}
|
556 |
556 |
|
557 |
557 |
settings.HOBO_HTTP_PROVISIONNING = True
|
558 |
558 |
with patch('hobo.agent.authentic2.provisionning.notify_agents') as notify_agents:
|
559 |
|
call_command('createsuperuser', domain=tenant.domain_url, uuid='coin2',
|
|
559 |
call_command('createsuperuser', domain=tenant.domain_url,
|
560 |
560 |
username='coin2', email='coin2@coin.org', interactive=False)
|
561 |
561 |
assert notify_agents.call_count == 1
|
562 |
562 |
assert set(notify_agents.call_args[0][0]['audience']) == {'http://example.org', 'http://example.com'}
|
... | ... | |
574 |
574 |
}
|
575 |
575 |
with patch('hobo.agent.authentic2.provisionning.notify_agents') as notify_agents:
|
576 |
576 |
with patch('hobo.agent.authentic2.provisionning.requests.put') as requests_put:
|
577 |
|
call_command('createsuperuser', domain=tenant.domain_url, uuid='coin2',
|
|
577 |
call_command('createsuperuser', domain=tenant.domain_url,
|
578 |
578 |
username='coin2', email='coin2@coin.org', interactive=False)
|
579 |
579 |
assert notify_agents.call_count == 1
|
580 |
580 |
assert notify_agents.call_args[0][0]['audience'] == ['http://example.com']
|
... | ... | |
591 |
591 |
}
|
592 |
592 |
with patch('hobo.agent.authentic2.provisionning.notify_agents') as notify_agents:
|
593 |
593 |
with patch('hobo.agent.authentic2.provisionning.requests.put') as requests_put:
|
594 |
|
call_command('createsuperuser', domain=tenant.domain_url, uuid='coin2',
|
|
594 |
call_command('createsuperuser', domain=tenant.domain_url,
|
595 |
595 |
username='coin2', email='coin2@coin.org', interactive=False)
|
596 |
596 |
assert notify_agents.call_count == 0
|
597 |
597 |
assert requests_put.call_count == 2
|
598 |
|
-
|