Revision dc824c9f test/ganeti.rapi.resources_unittest.py

b/test/ganeti.rapi.resources_unittest.py
48 48
  def testMapper(self):
49 49
    """Testing Mapper"""
50 50

  
51
    self._TestUri("/tags", (rlib1.R_tags, [], {}))
52
    self._TestUri("/instances", (rlib2.R_instances, [], {}))
51
    self._TestFailingUri("/tags")
52
    self._TestFailingUri("/instances")
53
    self._TestUri("/version", (rlib1.R_version, [], {}))
53 54

  
54
    self._TestUri('/instances/www.test.com',
55
    self._TestUri('/2/instances/www.test.com',
55 56
                  (rlib1.R_instances_name,
56 57
                   ['www.test.com'],
57 58
                   {}))
58 59

  
59
    self._TestUri('/instances/www.test.com/tags?f=5&f=6&alt=html',
60
                  (rlib1.R_instances_name_tags,
60
    self._TestUri('/2/instances/www.test.com/tags?f=5&f=6&alt=html',
61
                  (rlib2.R_2_instances_name_tags,
61 62
                   ['www.test.com'],
62 63
                   {'alt': ['html'],
63 64
                    'f': ['5', '6'],
......
75 76

  
76 77
  def testGet(self):
77 78
    expected = [
78
      {'name': 'info', 'uri': '/info'},
79
      {'name': 'instances', 'uri': '/instances'},
80
      {'name': 'nodes', 'uri': '/nodes'},
81
      {'name': 'os', 'uri': '/os'},
82
      {'name': 'tags', 'uri': '/tags'},
79
        # TODO: {'name': 'info', 'uri': '/2'},
83 80
      {'name': 'version', 'uri': '/version'},
84 81
      ]
85 82
    self.assertEquals(self.root.GET(), expected)

Also available in: Unified diff