def setUp(self): install_triggers() self.testuser = User.objects.create_user("testuser","testuser","testuser") self.testuser.is_staff = True Permission.objects.get(name='Can change member').user_set.add(self.testuser) self.testuser.save()
def setUp(self): install_triggers() post = SkipPost(text='Here be ponies.') post.save() self.post = post
def setUp(self): denorms.drop_triggers() denorms.install_triggers() post = models.SkipPost(text='Here be ponies.') post.save() self.post = post
def setUp(self): denorms.drop_triggers() denorms.install_triggers() self.testuser = User.objects.create_user("testuser", "testuser", "testuser") self.testuser.is_staff = True ctype = ContentType.objects.get_for_model(models.Member) self.testuser.save()
def setUp(self): install_triggers() self.testuser = User.objects.create_user("testuser","testuser","testuser") self.testuser.is_staff = True ctype = ContentType.objects.get_for_model(Member) Permission.objects.filter(content_type=ctype).get(name='Can change member').user_set.add(self.testuser) self.testuser.save()
def setUp(self): denorms.drop_triggers() denorm.models.DirtyInstance.objects.all().delete() denorms.install_triggers() post = models.SkipPost(text='Here be ponies.') post.save() self.post = post
def test_triggers(self): """Test potentially failing denorms. """ # save and restore alldenorms # test will fail if it's raising an exception alldenorms = denorms.alldenorms denorms.alldenorms = failingdenorms try: denorms.install_triggers() finally: denorms.alldenorms = alldenorms
def forwards(self, orm): # Adding field 'Course.description' db.add_column('courses_course', 'description', self.gf('django.db.models.TextField')(null=True, blank=True), keep_default=False) # Adding field 'Course.can_shorten' db.add_column('courses_course', 'can_shorten', self.gf('django.db.models.NullBooleanField')(null=True, blank=True), keep_default=False) # Adding field 'Course.path' db.add_column('courses_course', 'path', self.gf('django.contrib.gis.db.models.fields.GeometryField')(null=True, blank=True, srid=2193), keep_default=False) denorms.install_triggers()
def backwards(self, orm): # Deleting field 'Course.description' db.delete_column('courses_course', 'description') # Deleting field 'Course.can_shorten' db.delete_column('courses_course', 'can_shorten') # Deleting field 'Course.path' db.delete_column('courses_course', 'path') denorms.install_triggers()
def handle(self, **kwargs): denorms.install_triggers()
def setUp(self): denorms.drop_triggers() denorms.install_triggers()
def handle_noargs(self, **options): using = options['database'] denorms.install_triggers(using=using)
def handle(self, **kwargs): from denorm import denorms using = kwargs.get('using') denorms.install_triggers(using=using)
def handle_noargs(self, **options): using = options["database"] denorms.install_triggers(using=using)
def handle(self, **options): using = options['database'] denorms.install_triggers(using=using)