aboutsummaryrefslogtreecommitdiffstats
path: root/tests.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2017-02-22 22:44:36 +0200
committerFilipp Lepalaan <filipp@mac.com>2017-02-22 22:44:36 +0200
commitf998a6bca5ab48ee2d5ce5f52f6a93cff2485c9e (patch)
treeaf9b6dd23b5882a25aeb67c01cfc82d9f4d173d1 /tests.py
downloadbimclient-f998a6bca5ab48ee2d5ce5f52f6a93cff2485c9e.tar.gz
bimclient-f998a6bca5ab48ee2d5ce5f52f6a93cff2485c9e.tar.bz2
bimclient-f998a6bca5ab48ee2d5ce5f52f6a93cff2485c9e.zip
Initial commit
Diffstat (limited to 'tests.py')
-rw-r--r--tests.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests.py b/tests.py
new file mode 100644
index 0000000..136b7fd
--- /dev/null
+++ b/tests.py
@@ -0,0 +1,26 @@
+import os
+import logging
+import unittest
+
+from bimclient import bimclient
+
+
+class TestServerMethods(unittest.TestCase):
+ def setUp(self):
+ self.server = bimclient.connect(os.getenv('BIMCLIENT_URL'))
+
+ def test_connect(self):
+ self.assertEquals(len(self.server.version), 6)
+
+ def test_login(self):
+ self.server.login(os.getenv('BIMCLIENT_USER'),
+ os.getenv('BIMCLIENT_PW'))
+
+ def test_projects(self):
+ projects = self.server.projects()
+ self.assertGreater(len(projects), 0)
+
+
+if __name__ == '__main__':
+ logging.basicConfig(level=logging.DEBUG)
+ unittest.main()