Last active
August 29, 2015 14:06
-
-
Save dpnova/615ebe54fa06f94b1b0e to your computer and use it in GitHub Desktop.
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
class TestCase(unittest.TestCase): | |
def __call__(self, *args, **kwargs): | |
alembic_cfg = Config("../alembic.ini") | |
alembic_cfg.set_section_option( | |
"alembic", "script_location", "../alembic") | |
command.upgrade(alembic_cfg, "head") | |
r = super(TestCase, self).__call__(*args, **kwargs) | |
command.downgrade(alembic_cfg, "base") | |
return r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment