2010-12-31 5 views
0

django의 테스트 프레임 워크를 활용하기 위해 django 프로젝트에 시스템을 설치하려고합니다. 그러나, 내가 실행하려고하면 python manage.py test 나는 다양한 오류가 아래에 설명되어 있습니다.장고 테스트 - 사우스와 MySQL의 문제

우리는 개발 서버를 다시 시작하고 우리의 비품에서 "깨끗한"데이터를로드하기 위해 reset.bat 배치 파일을 사용하는 django 환경에서 작업하고 있습니다. 그렇다 우리 지역의 환경 처리에서, 백 파일은 다음을 나는 이노 엔진은 기본값으로 설정하여 python manage.py test를 실행하려고하면

Drops and Creates the MySQL Database "testsqldb" 

    drop database testsqldb; 
    create database testsqldb; 

Syncs the database with the models (ignoring anything with South migrations) 

    python manage.py syncdb --noinput 

Runs the migrations 

    python manage.py migrate --no-initial-data 

Loads the fixtures 

    python manage.py loaddata <fixture1> <fixture2> <fixture3> ... 

, 내가 얻을 :

! Error found during real run of migration! Aborting. 

! Since you have a database that does not support running 
! schema-altering statements in transactions, we have had 
! to leave it in an interim state between migrations. 

! You *might* be able to recover with: 

SQL 실행 취소 명령 생성 된 테이블은 "여기"로 표시됩니다.

! The South developers regret this has happened, and would 
! like to gently persuade you to consider a slightly 
! easier-to-deal-with DBMS. 
! NOTE: The error which caused the migration to fail is further up. 

내가의 MyISAM과 python manage.py test을 실행하려고

, 나는 시스템이 실행되는 동안 생성하도록되어 우리가 우리의 시스템에서 위조 한 테이블에 대한 오류를 얻을.

테스트를 실행하는 방법에 관한 생각이나 아이디어는 높이 평가 될 것입니다.

답변

1

MyISAM으로 python manage.py 테스트를 실행하면 시스템이 실행되는 동안 생성 된 것으로 추정되는 시스템에 위장한 테이블에 관한 오류가 발생합니다.

메타 모델을 만들었다면 메타 옵션을 managed=False으로 표시하면 도움이 될 것입니다. 그렇다면 장고는 그것을 만드는 데 관여하지 않을 것입니다.