def test_create(self, *args): # Configure the arguments that would be sent to the Ansible module set_module_args( dict(name='foo', parent='bar', ciphers= '!SSLv3:!SSLv2:ECDHE+AES-GCM+SHA256:ECDHE-RSA-AES128-CBC-SHA', cert_key_chain=[ dict(cert='bigip_ssl_cert1', key='bigip_ssl_key1', chain='bigip_ssl_cert1') ], provider=dict(server='localhost', password='******', user='******'))) module = AnsibleModule( argument_spec=self.spec.argument_spec, supports_check_mode=self.spec.supports_check_mode) mm = ModuleManager(module=module) # Override methods to force specific logic in the module to happen mm.exists = Mock(return_value=False) mm.create_on_device = Mock(return_value=True) results = mm.exec_module() assert results['changed'] is True
def test_create(self, *args): # Configure the arguments that would be sent to the Ansible module set_module_args(dict( name='foo', parent='bar', ciphers='!SSLv3:!SSLv2:ECDHE+AES-GCM+SHA256:ECDHE-RSA-AES128-CBC-SHA', cert_key_chain=[ dict( cert='bigip_ssl_cert1', key='bigip_ssl_key1', chain='bigip_ssl_cert1' ) ], password='******', server='localhost', user='******' )) module = AnsibleModule( argument_spec=self.spec.argument_spec, supports_check_mode=self.spec.supports_check_mode ) mm = ModuleManager(module=module) # Override methods to force specific logic in the module to happen mm.exists = Mock(return_value=False) mm.create_on_device = Mock(return_value=True) results = mm.exec_module() assert results['changed'] is True