[Python-modules-commits] [django-markupfield] 03/09: Pass request instance to formfield_for_dbfield method.

Michael Fladischer fladi at moszumanska.debian.org
Thu Sep 1 18:49:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch master
in repository django-markupfield.

commit b222996a7d9bb5447bb7e7202c5ec517ee4549cd
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Thu Sep 1 14:04:11 2016 +0200

    Pass request instance to formfield_for_dbfield method.
    
    This is required by Django 1.10.
---
 markupfield/tests/tests.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/markupfield/tests/tests.py b/markupfield/tests/tests.py
index 20c8c38..f7821e5 100644
--- a/markupfield/tests/tests.py
+++ b/markupfield/tests/tests.py
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
 
 import json
 
-from django.test import TestCase
+from django.test import TestCase, RequestFactory
 from django.core import serializers
 from django.utils.encoding import smart_text
 from markupfield.markup import DEFAULT_MARKUP_TYPES
@@ -280,8 +280,9 @@ class MarkupWidgetTests(TestCase):
         # borrows from regressiontests/admin_widgets/tests.py
         from django.contrib import admin
         ma = admin.ModelAdmin(Post, admin.site)
+        req = RequestFactory().get('/')
         self.assertTrue(isinstance(ma.formfield_for_dbfield(
-            Post._meta.get_field('body')).widget, AdminMarkupTextareaWidget))
+            Post._meta.get_field('body'), req).widget, AdminMarkupTextareaWidget))
 
 
 class MarkupFieldFormSaveTests(TestCase):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-markupfield.git



More information about the Python-modules-commits mailing list