Revision 55faa0bc kamaki/clients/cyclades/test.py
b/kamaki/clients/cyclades/test.py | ||
---|---|---|
35 | 35 |
from itertools import product |
36 | 36 |
|
37 | 37 |
from kamaki.clients import ClientError |
38 |
from kamaki.clients.cyclades import CycladesClient, CycladesClientApi
|
|
38 |
from kamaki.clients.cyclades import CycladesClient, CycladesRestClient
|
|
39 | 39 |
|
40 | 40 |
img_ref = "1m4g3-r3f3r3nc3" |
41 | 41 |
vm_name = "my new VM" |
... | ... | |
90 | 90 |
def release(self): |
91 | 91 |
pass |
92 | 92 |
|
93 |
rest_pkg = 'kamaki.clients.cyclades.CycladesClientApi'
|
|
93 |
rest_pkg = 'kamaki.clients.cyclades.CycladesRestClient'
|
|
94 | 94 |
cyclades_pkg = 'kamaki.clients.cyclades.CycladesClient' |
95 | 95 |
|
96 | 96 |
|
97 |
class CycladesRestApi(TestCase):
|
|
97 |
class CycladesRest(TestCase): |
|
98 | 98 |
|
99 | 99 |
"""Set up a Cyclades thorough test""" |
100 | 100 |
def setUp(self): |
101 | 101 |
self.url = 'http://cyclades.example.com' |
102 | 102 |
self.token = 'cyc14d3s70k3n' |
103 |
self.client = CycladesClientApi(self.url, self.token)
|
|
103 |
self.client = CycladesRestClient(self.url, self.token)
|
|
104 | 104 |
|
105 | 105 |
def tearDown(self): |
106 | 106 |
FR.json = vm_recv |
... | ... | |
444 | 444 |
if not argv[1:] or argv[1] == 'Cyclades': |
445 | 445 |
not_found = False |
446 | 446 |
runTestCase(Cyclades, 'Cyclades Client', argv[2:]) |
447 |
if not argv[1:] or argv[1] == 'CycladesRestApi':
|
|
447 |
if not argv[1:] or argv[1] == 'CycladesRest': |
|
448 | 448 |
not_found = False |
449 |
runTestCase(CycladesRestApi, 'CycladesRestApi Client', argv[2:])
|
|
449 |
runTestCase(CycladesRest, 'CycladesRest Client', argv[2:])
|
|
450 | 450 |
if not_found: |
451 | 451 |
print('TestCase %s not found' % argv[1]) |
Also available in: Unified diff