-
Notifications
You must be signed in to change notification settings - Fork 2
/
plugin_test.py
executable file
·49 lines (40 loc) · 1.33 KB
/
plugin_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /usr/bin/env python
from txcas.interface import (
IRealmFactory,
IServiceManagerFactory,
ITicketStoreFactory,
IViewProviderFactory)
from twisted.internet.interfaces import IStreamServerEndpointStringParser
from twisted.plugin import getPlugins
from twisted.cred.strcred import ICheckerFactory
print "== ITicketStore test =="
for n, thing in enumerate(getPlugins(ITicketStoreFactory)):
print("%02d %s" % (n, thing))
print(thing.tag)
print("")
print "== IRealmFactory test =="
for n, thing in enumerate(getPlugins(IRealmFactory)):
print("%02d %s" % (n, thing))
print(thing.tag)
print("")
print "== ICredentialsChecker test =="
for n, thing in enumerate(getPlugins(ICheckerFactory)):
print("%02d %s" % (n, thing))
print(thing.authType)
print("")
print "== IServiceManagerFactory test =="
for n, thing in enumerate(getPlugins(IServiceManagerFactory)):
print("%02d %s" % (n, thing))
print(thing.tag)
print("")
print "== IViewProviderFactory test =="
for n, thing in enumerate(getPlugins(IViewProviderFactory)):
print("%02d %s" % (n, thing))
print(thing.tag)
print("")
print("== IStreamServerEndpointStringParser ==")
for n, thing in enumerate(getPlugins(IStreamServerEndpointStringParser)):
print("%02d %s" % (n, thing))
print(thing.prefix)
print("")
print("")