Refactor test run

This commit is contained in:
Iacopo Spalletti 2015-01-01 18:51:45 +01:00
commit 8a6b54e1c9
5 changed files with 32 additions and 20 deletions

View file

@ -94,3 +94,14 @@ HELPER_SETTINGS = {
}
if 'test' in sys.argv:
HELPER_SETTINGS['INSTALLED_APPS'].append('django_nose')
def run():
from collections import defaultdict
from djangocms_helper import main
args = defaultdict(str)
args['<application>'] = 'djangocms_blog'
args['test'] = True
args['--cms'] = True
args['--nose-runner'] = True
main.core(args=args, application='djangocms_blog')