aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/tools.py
diff options
context:
space:
mode:
authorNathan Yergler <nathan@yergler.net>2013-04-13 15:54:18 -0700
committerNathan Yergler <nathan@yergler.net>2013-04-13 15:54:58 -0700
commit64598a79a9648416e9cc49349e57190792cc59f2 (patch)
treeec2ec9277fada3df7d15b343cf3fb18ffb825876 /mediagoblin/tests/tools.py
parent50bf38b26ee0cba6c30ed2484bf10155ba853497 (diff)
parentc121a7d3d0c48d4e3abf43c06047dde3e25616c3 (diff)
downloadmediagoblin-64598a79a9648416e9cc49349e57190792cc59f2.tar.lz
mediagoblin-64598a79a9648416e9cc49349e57190792cc59f2.tar.xz
mediagoblin-64598a79a9648416e9cc49349e57190792cc59f2.zip
Merge remote-tracking branch 'joar-github/oauth/refresh_tokens'
This merges the patch for Issue #548.
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r--mediagoblin/tests/tools.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py
index a0498a6e..52635e18 100644
--- a/mediagoblin/tests/tools.py
+++ b/mediagoblin/tests/tools.py
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import sys
import os
import pkg_resources
import shutil
@@ -28,7 +29,6 @@ from mediagoblin import mg_globals
from mediagoblin.db.models import User, MediaEntry, Collection
from mediagoblin.tools import testing
from mediagoblin.init.config import read_mediagoblin_config
-from mediagoblin.db.open import setup_connection_and_db_from_config
from mediagoblin.db.base import Session
from mediagoblin.meddleware import BaseMeddleware
from mediagoblin.auth.lib import bcrypt_gen_password_hash
@@ -50,7 +50,9 @@ USER_DEV_DIRECTORIES_TO_SETUP = ['media/public', 'media/queue']
BAD_CELERY_MESSAGE = """\
Sorry, you *absolutely* must run tests with the
mediagoblin.init.celery.from_tests module. Like so:
-$ CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_tests ./bin/py.test"""
+
+$ CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_tests {0}
+""".format(sys.argv[0])
class BadCeleryEnviron(Exception): pass
@@ -230,7 +232,7 @@ def fixture_media_entry(title=u"Some title", slug=None,
entry.slug = slug
entry.uploader = uploader or fixture_add_user().id
entry.media_type = u'image'
-
+
if gen_slug:
entry.generate_slug()
if save: