def test_ignores_twisted_named_methods(self): resource = Resource() resource.render_GET = lambda self: None resource.render_PUT = lambda self: None resource.delete = lambda self: None self.assertEqual(set(resource.methods()), set(["delete"]))
def test_non_callable_method(self): resource = Resource() resource.get = lambda self: None resource.put = lambda self: None resource.delete = None self.assertEqual(set(resource.methods()), set(["get", "put"]))