Move example app, which was a bad example, to the tests namespace. Its what it was used for anyway. A better example will be provided later

This commit is contained in:
Matt Wright
2012-08-22 12:00:46 -04:00
parent 17416cb535
commit 2471ba0db8
14 changed files with 271 additions and 303 deletions
+7 -7
View File
@@ -1,6 +1,5 @@
from unittest import TestCase
from example import app
from tests.test_app.sqlalchemy import create_app
class SecurityTest(TestCase):
@@ -9,14 +8,15 @@ class SecurityTest(TestCase):
def setUp(self):
super(SecurityTest, self).setUp()
self.app = self._create_app(self.AUTH_CONFIG or None)
self.app.debug = False
self.app.config['TESTING'] = True
app = self._create_app(self.AUTH_CONFIG or {})
app.debug = False
app.config['TESTING'] = True
self.client = self.app.test_client()
self.app = app
self.client = app.test_client()
def _create_app(self, auth_config):
return app.create_sqlalchemy_app(auth_config)
return create_app(auth_config)
def _get(self, route, content_type=None, follow_redirects=None, headers=None):
return self.client.get(route, follow_redirects=follow_redirects,