-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add couple of tests with Flask-Testing (#37).
Until #56 is fixed we can't advance, though.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from flask import Flask | ||
from labmanager.tests.util import G4lTestCase | ||
|
||
class TestPublicLabs(G4lTestCase): | ||
def test_what(self): | ||
response = self.client.get('/public/labs/public/') | ||
self.assert_200(response) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from flask.ext.testing import TestCase | ||
from labmanager import app | ||
from labmanager.sample_data import add_sample_users | ||
from labmanager.db import db_session | ||
|
||
class G4lTestCase(TestCase): | ||
SQLALCHEMY_DATABASE_URI = "sqlite://" | ||
TESTING = True | ||
|
||
def create_app(self): | ||
return app | ||
|
||
def setUp(self): | ||
add_sample_users() | ||
|
||
def tearDown(self): | ||
db_session.remove() | ||
|