summaryrefslogtreecommitdiff
path: root/src/leap/mx
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2013-02-17 04:35:08 +0000
committerIsis Lovecruft <isis@torproject.org>2013-02-17 15:30:09 +0000
commited0be24a1053f370b60f315e26ed52d350c4063e (patch)
treed82f5ffa2de5cd11b1834f611f176a0c024984b5 /src/leap/mx
parent66d60a58ef752f9c9692dd8bdb0f61a5c1dfdb17 (diff)
Add outline of unittests for leap/mx/alias_resolver.py.
Diffstat (limited to 'src/leap/mx')
-rw-r--r--src/leap/mx/tests/test_alias_resolver.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/leap/mx/tests/test_alias_resolver.py b/src/leap/mx/tests/test_alias_resolver.py
new file mode 100644
index 0000000..c8d7952
--- /dev/null
+++ b/src/leap/mx/tests/test_alias_resolver.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# -*- encoding: utf-8 -*-
+'''
+test_alias_resolver.py
+======================
+Unittests for /leap/mx/alias_resolver.py.
+
+@authors: Isis Agora Lovecruft
+@license: see included LICENSE file
+@copyright: copyright 2013 Isis Agora Lovecruft
+'''
+
+from twisted.internet import address
+from twisted.mail import maildir, alias
+from twisted.protocols import postfix
+
+from leap.mx import alias_resolver
+from leap.mx.util import config, log, net
+
+
+if __name__ == "__main__":
+ config.filename = 'mx.conf.private'
+ config.loadConfig()
+
+ user = config.couch.user
+ pswd = config.couch.passwd
+ host = config.couch.host
+ port = config.couch.port
+
+ connection = alias_resolver.ConnectedCouchDB(host, port,
+ dbName="users",
+ username=user,
+ password=pswd)
+ connection.listDB()
+ print connection