~ubuntu-branches/ubuntu/saucy/python-novaclient/saucy

« back to all changes in this revision

Viewing changes to tests/v1_1/test_certs.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-02-03 10:46:49 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20120203104649-3604yixrglbsoi0g
Tags: 2012.1~e4~20120203.484-0ubuntu1
New upstream release. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from novaclient import exceptions
 
2
from novaclient.v1_1 import certs
 
3
from tests import utils
 
4
from tests.v1_1 import fakes
 
5
 
 
6
 
 
7
cs = fakes.FakeClient()
 
8
 
 
9
 
 
10
class FlavorsTest(utils.TestCase):
 
11
 
 
12
    def test_create_cert(self):
 
13
        cert = cs.certs.create()
 
14
        cs.assert_called('POST', '/os-certificates')
 
15
        self.assertTrue(isinstance(cert, certs.Certificate))
 
16
 
 
17
    def test_get_root_cert(self):
 
18
        cert = cs.certs.get()
 
19
        cs.assert_called('GET', '/os-certificates/root')
 
20
        self.assertTrue(isinstance(cert, certs.Certificate))