Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make test and coverage works

  • Loading branch information...
commit 8757f0872e84fa6a65dff6bf907759820dc6d138 1 parent 2cf879c
Hsiaoming Yang authored
4 Makefile
View
@@ -51,9 +51,9 @@ testing:
@nosetests -v
coverage:
- @rm .coverage
+ @rm -f .coverage
@nosetests --with-cov --cov june tests/
- @rm .coverage
+ @rm -f .coverage
# Sphinx Documentation
docs:
0  tests/__init__.py
View
No changes.
22 tests/test_db.py
View
@@ -1,22 +0,0 @@
-import os
-import tempfile
-from june.app import create_app
-
-
-class TestDatabase(object):
- def setUp(self):
- app = create_app()
- self.db_fd, self.db_path = tempfile.mkstemp()
- app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///%s' % self.db_path
- app.config['TESTING'] = True
- self.app = app.test_client()
-
- #: rv = self.app.get('/')
- #: assert 'something' in rv.data
-
- #from june.account import models
- #models.db.create_all()
-
- def tearDown(self):
- os.close(self.db_fd)
- os.unlink(self.db_path)
8 tests/test_front.py
View
@@ -1,11 +1,9 @@
-from june.app import create_app
+# coding: utf-8
+from .suite import BaseSuite
-class TestHomePage(object):
- def setUp(self):
- self.app = create_app()
- self.client = self.app.test_client()
+class TestFront(BaseSuite):
def test_get(self):
rv = self.client.get('/')
assert rv.status_code == 200
Please sign in to comment.
Something went wrong with that request. Please try again.