~ubuntu-branches/ubuntu/precise/glance/precise-proposed

« back to all changes in this revision

Viewing changes to glance/tests/unit/test_versions.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandleman
  • Date: 2012-01-20 14:37:16 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20120120143716-2va2h1g2230m51zx
Tags: 2012.1~e3~20120120.1206-0ubuntu1
[Chuck Short]
* New upstream release.

[Adam Gandleman]
* debian/glance-api.install, glance-registry.install:  Install
  new paste configs that have been split among servers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#    under the License.
17
17
 
18
18
import json
19
 
import unittest
20
19
 
21
 
import stubout
22
20
import webob
23
21
 
24
22
from glance import client
25
23
from glance.common import config
26
24
from glance.common import exception
27
25
from glance.api import versions
28
 
from glance.tests import stubs
29
26
from glance.tests import utils
30
 
 
31
 
 
32
 
class VersionsTest(unittest.TestCase):
 
27
from glance.tests.unit import base
 
28
 
 
29
 
 
30
class VersionsTest(base.IsolatedUnitTest):
33
31
 
34
32
    """
35
33
    Test the version information returned from
36
34
    the API service
37
35
    """
38
36
 
39
 
    def setUp(self):
40
 
        """Establish a clean test environment"""
41
 
        self.stubs = stubout.StubOutForTesting()
42
 
        stubs.stub_out_registry_and_store_server(self.stubs)
43
 
 
44
 
    def tearDown(self):
45
 
        """Clear the test environment"""
46
 
        self.stubs.UnsetAll()
47
 
 
48
37
    def test_get_version_list(self):
49
38
        req = webob.Request.blank('/', base_url="http://0.0.0.0:9292/")
50
39
        req.accept = "application/json"