-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unmaintained flask testing library and improve tests speed by clearing tables instead of dropping and recreating them between each test. These changes also help in upgrading the other flask dependencies.
- Loading branch information
Showing
2 changed files
with
4 additions
and
22 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 |
---|---|---|
@@ -1,24 +1,5 @@ | ||
import os | ||
from critiquebrainz.frontend.testing import FrontendTestCase | ||
|
||
from flask_testing import TestCase | ||
|
||
from critiquebrainz.data.utils import create_all, drop_tables, drop_types, clear_tables | ||
from critiquebrainz.frontend import create_app | ||
|
||
|
||
class DataTestCase(TestCase): | ||
|
||
def create_app(self): | ||
app = create_app(config_path=os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'test_config.py')) | ||
return app | ||
|
||
def setUp(self): | ||
self.reset_db() | ||
# TODO(roman): Add stuff form fixtures. | ||
|
||
def tearDown(self): | ||
pass | ||
|
||
@staticmethod | ||
def reset_db(): | ||
clear_tables() | ||
class DataTestCase(FrontendTestCase): | ||
pass |
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