~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/server/tests/test_registry.py

Merged 921421-completemultipart [r=oubiwann][f=921421]

This branch adds Complete Multipart method to s3 client.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        self.assertRaises(RuntimeError, self.registry.add, TestMethod2,
52
52
                          "test", "1.0")
53
53
 
54
 
    def test_get_actions(self):
55
 
        """
56
 
        L{MethodRegistry.get_actions} returns a list of action names.
57
 
        """
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()))
63
 
 
64
 
    def test_get_versions(self):
65
 
        """
66
 
        L{MethodRegistry.get_versions} returns a list of versions supported by
67
 
        the action.
68
 
        """
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")))
76
 
 
77
54
    def test_get(self):
78
55
        """
79
56
        L{MethodRegistry.get} returns the method class registered for the