'- os_server:
image: cirros
flavor: missing_flavor
nics:
- net-name: network1'

def test_create_server_bad_flavor(self):

    with pytest.raises(AnsibleFail):
        os_server._create_server(self.module, self.cloud)
    assert ('missing_flavor' in self.module.fail_json.call_args[1]['msg'])
