Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / app_settings / default / tests.py @ d0986bac

History | View | Annotate | Download (349 Bytes)

1 1277fb19 Vangelis Koukis
# -*- coding: utf-8 -*-
2 1277fb19 Vangelis Koukis
#
3 1277fb19 Vangelis Koukis
# Special unit test mode
4 1277fb19 Vangelis Koukis
#########################
5 1277fb19 Vangelis Koukis
6 1277fb19 Vangelis Koukis
# A quick-n-dirty way which sets settings.TEST
7 1277fb19 Vangelis Koukis
# if we're running unit tests.
8 04a38bd0 Kostas Papadimitriou
import sys, os
9 1277fb19 Vangelis Koukis
TEST = False
10 1277fb19 Vangelis Koukis
if len(sys.argv) >= 2:
11 1277fb19 Vangelis Koukis
    if os.path.basename(sys.argv[0]) == 'manage.py' and \
12 1277fb19 Vangelis Koukis
        (sys.argv[1] == 'test' or sys.argv[1] == 'hudson'):
13 1277fb19 Vangelis Koukis
            TEST = True