'- os_server:
image: cirros
flavor: m1.tiny
nics:
- net-name: network1
meta:
- key: value'

def test_create_server(self):

    with pytest.raises(AnsibleExit):
        os_server._create_server(self.module, self.cloud)
    assert (self.cloud.create_server.call_count == 1)
    assert (self.cloud.create_server.call_args[1]['image'] == self.cloud.get_image_id('cirros'))
    assert (self.cloud.create_server.call_args[1]['flavor'] == self.cloud.get_flavor('m1.tiny')['id'])
    assert (self.cloud.create_server.call_args[1]['nics'][0]['net-id'] == self.cloud.get_network('network1')['id'])
