Permalink
Browse files

start unittests

  • Loading branch information...
1 parent ec670e3 commit 8ffb01f978cfae0aeb67acef57d06e713f4d9a8e socketubs committed Mar 25, 2013
Showing with 28 additions and 1 deletion.
  1. +0 −1 .gitignore
  2. +28 −0 tests/run_tests.py
View
1 .gitignore
@@ -35,7 +35,6 @@ nosetests.xml
.pydevproject
leselys.db
-tests
venv
virtualenv
*.ini
View
28 tests/run_tests.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import unittest
+
+from leselys import core
+
+
+from flask import request
+
+core.app.config['TESTING'] = True
+core.load_config('config.ini')
+core.load_storage()
+core.load_session()
+core.load_wsgi()
+
+class TestLeselysAPI(unittest.TestCase):
+
+ def setUp(self):
+ self.r = core.app.test_client()
+
+ def test_01_home(self):
+ with self.r as c:
+ rv = c.get('/?jsonsify=true')
+ print(rv.status_code)
+ print(rv.data)
+
+if __name__ == "__main__":
+ unittest.main()

0 comments on commit 8ffb01f

Please sign in to comment.