'Tests replacing image members raises right exception'

def test_replace_members_non_existing_image(self):

    test_router_api = router.API(self.mapper)
    self.api = test_utils.FakeAuthMiddleware(test_router_api, is_admin=True)
    fixture = dict(member_id='pattieblack')
    req = webob.Request.blank(('/images/%s/members' % _gen_uuid()))
    req.method = 'PUT'
    req.content_type = 'application/json'
    req.body = jsonutils.dump_as_bytes(dict(image_memberships=fixture))
    res = req.get_response(self.api)
    self.assertEqual(http_client.NOT_FOUND, res.status_int)
