fix basic ci

This commit is contained in:
virusdefender 2017-01-23 16:05:52 +08:00
parent 3e42e6648e
commit 5c5cf7ff98
2 changed files with 9 additions and 10 deletions

View File

@ -1,13 +1,12 @@
language: python language: python
python: python:
- "2.7" - "3.5"
install: install:
- pip install -r dockerfiles/oj_web_server/requirements.txt - pip install -r deploy/requirements.txt
- mkdir log test_case upload - mkdir log test_case upload
- cp oj/custom_settings.example.py oj/custom_settings.py - cp oj/custom_settings.example.py oj/custom_settings.py
- echo "SECRET_KEY=\"`cat /dev/urandom | head -1 | md5sum | head -c 32`\"" >> oj/custom_settings.py - echo "SECRET_KEY=\"`cat /dev/urandom | head -1 | md5sum | head -c 32`\"" >> oj/custom_settings.py
- python manage.py migrate - python manage.py migrate
- python manage.py migrate --database=submission
- python manage.py initadmin - python manage.py initadmin
script: script:
- python manage.py test - python manage.py test

View File

@ -4,7 +4,7 @@ from unittest import mock
from django.contrib import auth from django.contrib import auth
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from utils.otp_auth import OtpAuth from otpauth import OtpAuth
from utils.shortcuts import rand_str from utils.shortcuts import rand_str
from utils.api.tests import APITestCase, APIClient from utils.api.tests import APITestCase, APIClient