setting the sfa-0.9-15 tag
[sfa.git] / sfa / server / modpythonapi / TestApi.py
1 from AuthenticatedApi import AuthenticatedApi, BadRequestHash
2
3 class RemoteApi(AuthenticatedApi):
4     def __init__(self, encoding="utf-8", trustedRootsDir="/usr/local/testapi/var/trusted_roots"):
5         return AuthenticatedApi.__init__(self, encoding)
6
7     def get_log_name(self):
8         return "/usr/local/testapi/var/logfile.txt"
9
10     def register_functions(self):
11         AuthenticatedApi.register_functions(self)
12         self.register_function(self.typeError)
13         self.register_function(self.badRequestHash)
14
15     def typeError(self):
16         raise TypeError()
17
18     def badRequestHash(self):
19         raise BadRequestHash("somehashvalue")