Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit cd8fd7abfa0647e9c3c8bb37bad2735ad8f7e2fc
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Mar 1 11:42:35 2013 +0100
Fix import and have the flask tests running with the in memory database
---------------------------------------------------------------
tests/test_flask.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/tests/test_flask.py b/tests/test_flask.py
index eb05dce..02431b7 100644
--- a/tests/test_flask.py
+++ b/tests/test_flask.py
@@ -38,19 +38,17 @@ import os
from datetime import date
sys.path.insert(0, os.path.join(os.path.dirname(
- os.path.abspath(__file__)), '..', '..'))
+ os.path.abspath(__file__)), '..'))
import fedocal
import fedocal.fedocallib as fedocallib
-from tests import Modeltests, DB_PATH, FakeUser
+from tests import Modeltests, FakeUser
# pylint: disable=E1103
class Flasktests(Modeltests):
""" Flask application tests. """
- session = None
-
def __setup_db(self):
""" Add a calendar and some meetings so that we can play with
something. """
@@ -64,8 +62,7 @@ class Flasktests(Modeltests):
super(Flasktests, self).setUp()
fedocal.APP.config['TESTING'] = True
- fedocal.SESSION = fedocallib.create_session(
- 'sqlite:///%s' % DB_PATH)
+ fedocal.SESSION = self.session
self.app = fedocal.APP.test_client()
def test_index_empty(self):