'Tests that requesting none for networking is OK. This test
short-circuits on a FlavorNotFound error.'

@mock.patch.object(objects.Flavor, 'get_by_flavor_id', side_effect=exception.FlavorNotFound(flavor_id='2'))
def test_create_server_none_flavornotfound(self, get_flavor):

    self.useFixture(nova_fixtures.AllServicesCurrent())
    ex = self.assertRaises(webob.exc.HTTPBadRequest, self._create_server, 'none')
    self.assertIn('Flavor    2    could    not    be    found', six.text_type(ex))
