Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit 2867c008dbc726bc94aee866d7b62d12149145d8
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Mar 1 11:42:17 2013 +0100
Fix imports and make the API tests running with the in memory database
---------------------------------------------------------------
tests/test_flask_api.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/test_flask_api.py b/tests/test_flask_api.py
index 93a4daf..d777c4a 100644
--- a/tests/test_flask_api.py
+++ b/tests/test_flask_api.py
@@ -37,11 +37,12 @@ import os
from datetime import timedelta
sys.path.insert(0, os.path.join(os.path.dirname(
- os.path.abspath(__file__)), '..', '..'))
+ os.path.abspath(__file__)), '..'))
import fedocal
+import fedocal.api
import fedocal.fedocallib as fedocallib
-from tests import Modeltests, DB_PATH, TODAY
+from tests import Modeltests, TODAY
# pylint: disable=E1103
@@ -61,8 +62,8 @@ class FlaskApitests(Modeltests):
super(FlaskApitests, self).setUp()
fedocal.APP.config['TESTING'] = True
- fedocal.APP.config['DB_URL'] = DB_PATH
fedocal.SESSION = self.session
+ fedocal.api.SESSION = self.session
self.app = fedocal.APP.test_client()
def test_api(self):