~termie/nova/db_migration

« back to all changes in this revision

Viewing changes to nova/tests/api/fakes.py

  • Committer: Andy Smith
  • Date: 2011-01-18 23:51:13 UTC
  • mfrom: (556.2.23 nova)
  • Revision ID: code@term.ie-20110118235113-ivu21efg3h9z6niq
merge from upstream and fix small issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
 
 
3
 
# Copyright 2010 OpenStack LLC.
4
 
# All Rights Reserved.
5
 
#
6
 
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
7
 
#    not use this file except in compliance with the License. You may obtain
8
 
#    a copy of the License at
9
 
#
10
 
#         http://www.apache.org/licenses/LICENSE-2.0
11
 
#
12
 
#    Unless required by applicable law or agreed to in writing, software
13
 
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
 
#    License for the specific language governing permissions and limitations
16
 
#    under the License.
17
 
 
18
 
import webob.dec
19
 
from nova import wsgi
20
 
 
21
 
 
22
 
class APIStub(object):
23
 
    """Class to verify request and mark it was called."""
24
 
    @webob.dec.wsgify
25
 
    def __call__(self, req):
26
 
        return req.path_info