Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
40 additions
and
5 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 |
---|---|---|
@@ -26,6 +26,7 @@ pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
cover | ||
.tox | ||
nosetests.xml | ||
|
||
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
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 |
---|---|---|
@@ -1,8 +1,29 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
from unittest import TestCase | ||
|
||
from gstack import app, configure_app | ||
from . import settings | ||
from .utils import FlaskTestCaseMixin | ||
|
||
class GStackTestCase(TestCase): | ||
pass | ||
|
||
class GStackAppTestCase(FlaskTestCaseMixin, GStackTestCase): | ||
|
||
def _configure_app(self): | ||
configure_app(settings=settings) | ||
|
||
def setUp(self): | ||
super(GStackTestCase, self).setUp() | ||
self._configure_app() | ||
self.app = app | ||
self.client = self.app.test_client() | ||
self.app_context = self.app.app_context() | ||
self.app_context.push() | ||
|
||
def tearDown(self): | ||
super(GStackTestCase, self).tearDown() | ||
self.app_context.pop() | ||
|
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,9 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
from . import GStackAppTestCase | ||
|
||
class SampleTestCase(GStackAppTestCase): | ||
|
||
def test_sample(self): | ||
pass |