<s> from __future__ import unicode_literals <EOL> from django . contrib . admin . templatetags . admin_modify import submit_row <EOL> from django . contrib . auth . admin import UserAdmin <EOL> from django . contrib . auth . models import User <EOL> from django . test import RequestFactory <EOL> from django . urls import reverse <EOL> from . admin import site <EOL> from . tests import AdminViewBasicTestCase <EOL> class AdminTemplateTagsTest ( AdminViewBasicTestCase ) : <EOL> def test_submit_row ( self ) : <EOL> """<STR_LIT>""" <EOL> factory = RequestFactory ( ) <EOL> request = factory . get ( reverse ( '<STR_LIT>' , args = [ self . superuser . pk ] ) ) <EOL> request . user = self . superuser <EOL> admin = UserAdmin ( User , site ) <EOL> extra_context = { '<STR_LIT>' : True } <EOL> response = admin . change_view ( request , str ( self . superuser . pk ) , extra_context = extra_context ) <EOL> template_context = submit_row ( response . context_data ) <EOL> self . assertEqual ( template_context [ '<STR_LIT>' ] , True ) <EOL> self . assertEqual ( template_context [ '<STR_LIT>' ] , True ) </s>
