Skip to content

Commit

Permalink
small useless renames in testing framework
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Jan 20, 2015
1 parent 0110a9f commit 3a89175
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
class FormPostsTestCase(unittest.TestCase):

def setUp(self):
self.tearDown()
DB.create_all()

def tearDown(self):
Expand Down
8 changes: 5 additions & 3 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import unittest

from flask.ext.script import Manager, prompt_bool
from flask.ext.migrate import Migrate, MigrateCommand, upgrade

from formspree import create_app, app
from formspree.tests import FormPosts

forms_app = create_app()
manager = Manager(forms_app)
Expand All @@ -21,11 +19,15 @@ def run_debug(port=5000):

@manager.command
def test():
import unittest
from formspree.tests import form_posts
from formspree.settings import TEST_DATABASE

assert TEST_DATABASE, "Please configure environment variable: TEST_DATABASE_URL with test database."
print "Launching tests:"

upgrade()
suite = unittest.TestLoader().loadTestsFromTestCase(FormPosts.FormPostsTestCase)
suite = unittest.TestLoader().loadTestsFromTestCase(form_posts.FormPostsTestCase)
unittest.TextTestRunner(verbosity=2).run(suite)


Expand Down

0 comments on commit 3a89175

Please sign in to comment.