Revision 44a90141 snf-cyclades-app/synnefo/api/test/versions.py

b/snf-cyclades-app/synnefo/api/test/versions.py
42 42
class APITest(TestCase):
43 43
    def test_api_version(self):
44 44
        """Check API version."""
45
        path = get_service_path(cyclades_services,
46
                                'compute', version='v2.0')
45
        path = get_service_path(cyclades_services, 'compute', version='2')
47 46
        with astakos_user('user'):
48 47
            response = self.client.get(path)
49 48
        self.assertEqual(response.status_code, 200)
50 49
        api_version = json.loads(response.content)['version']
51
        self.assertEqual(api_version['id'], 'v2.0')
50
        self.assertEqual(api_version['id'], 'v2')
52 51
        self.assertEqual(api_version['status'], 'CURRENT')
53 52

  
54 53
    def test_catch_wrong_api_paths(self, *args):
55
        path = get_service_path(cyclades_services,
56
                                'compute', version='v2.0')
54
        path = get_service_path(cyclades_services, 'compute', version='2')
57 55
        response = self.client.get(join_urls(path, 'nonexistent'))
58 56
        self.assertEqual(response.status_code, 400)
59 57
        try:

Also available in: Unified diff