add some tests

This commit is contained in:
virusdefender
2016-10-30 02:17:35 +08:00
parent 078de956e5
commit 39857d1b56
118 changed files with 326 additions and 19131 deletions

View File

@@ -1,21 +0,0 @@
# coding=utf-8
from django.core.management.base import BaseCommand
import os
class Command(BaseCommand):
def handle(self, *args, **options):
try:
if os.system("python manage.py migrate") != 0:
self.stdout.write(self.style.ERROR("Failed to execute command 'migrate'"))
exit(1)
if os.system("python manage.py migrate --database=submission") != 0:
self.stdout.write(self.style.ERROR("Failed to execute command 'migrate --database=submission'"))
exit(1)
if os.system("python manage.py initadmin") != 0:
self.stdout.write(self.style.ERROR("Failed to execute command 'initadmin'"))
exit(1)
self.stdout.write(self.style.SUCCESS("Done"))
except Exception as e:
self.stdout.write(self.style.ERROR("Failed to initialize, error: " + str(e)))