Commit 56ab68fb by Natalia Bidart

Run migration with autocommit so tests run with sqlite.

parent 6466fb77
...@@ -2,16 +2,17 @@ ...@@ -2,16 +2,17 @@
from south.utils import datetime_utils as datetime from south.utils import datetime_utils as datetime
from south.db import db from south.db import db
from south.v2 import DataMigration from south.v2 import DataMigration
from django.db import models from django.db import models, transaction
class Migration(DataMigration): class Migration(DataMigration):
def forwards(self, orm): def forwards(self, orm):
"Write your forwards methods here." "Write your forwards methods here."
ct, created = orm['contenttypes.ContentType'].objects.get_or_create( with transaction.autocommit():
ct, _ = orm['contenttypes.ContentType'].objects.get_or_create(
model='useropenid', app_label='django_openid_auth', model='useropenid', app_label='django_openid_auth',
defaults=dict(name='user open id')) defaults=dict(name='user open id'))
perm, created = orm['auth.permission'].objects.get_or_create( perm, _ = orm['auth.permission'].objects.get_or_create(
content_type=ct, codename='account_verified', content_type=ct, codename='account_verified',
defaults=dict(name=u'The OpenID account has been verified')) defaults=dict(name=u'The OpenID account has been verified'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment