Created
July 22, 2009 20:57
-
-
Save acdha/152266 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
#!/usr/bin/env python | |
import sys | |
import os | |
PROJECT_ROOT = os.path.realpath(os.path.join(os.path.dirname(__file__), "..")) | |
sys.path.insert(0, os.path.join(PROJECT_ROOT, "apps")) | |
sys.path.insert(0, PROJECT_ROOT) | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' | |
from django.core.management.commands import test | |
import logging | |
def main(): | |
# Since we're not running in a server, we'll just dump everything to the console: | |
logging.basicConfig(level=logging.DEBUG, format='%(levelname)s: %(message)s') | |
# Initialization: | |
# call_command('loaddata', verbosity=0, ['fixtures1']) | |
# from django.conf import settings | |
# settings.INSTALLED_APPS.append('NoSuchApp') | |
c = test.Command() | |
c.handle('core') | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment