51
51
self.assertRaises(RuntimeError, self.registry.add, TestMethod2,
54
def test_get_actions(self):
56
L{MethodRegistry.get_actions} returns a list of action names.
58
self.registry.add(TestMethod, "test", "1.0")
59
self.registry.add(TestMethod, "test", "2.0")
60
self.registry.add(TestMethod, "test2", "1.0")
61
self.assertEqual(["test", "test2"],
62
sorted(self.registry.get_actions()))
64
def test_get_versions(self):
66
L{MethodRegistry.get_versions} returns a list of versions supported by
69
self.registry.add(TestMethod, "test", "1.0")
70
self.registry.add(TestMethod, "test", "2.0")
71
self.registry.add(TestMethod, "test2", "1.0")
72
self.assertEqual(["1.0", "2.0"],
73
sorted(self.registry.get_versions("test")))
74
self.assertEqual(["1.0"],
75
sorted(self.registry.get_versions("test2")))
77
54
def test_get(self):
79
56
L{MethodRegistry.get} returns the method class registered for the