  import datetime
  import tempfile
  import os
  
  from django import forms
  from django.contrib.auth.models import User
  from django.contrib.contenttypes import generic
  from django.contrib.contenttypes.models import ContentType
  from django.core.files.storage import FileSystemStorage
  from django.db import models
 
</s> remove     def test_media_minified_only_if_debug_is_false(self):
        """
        Ensure that, with ModelAdmin, the minified versions of the JS files are
        only used when DEBUG is False.
        Refs #17521.
        """
        ma = ModelAdmin(Band, self.site)
        ma.prepopulated_fields = ['something']
        ma.actions = ['some action']

        with override_settings(DEBUG=False):
            media_js = str(ma.media['js'])
            self.assertFalse('jquery.js' in media_js)
            self.assertTrue('jquery.min.js' in media_js)
            self.assertFalse('prepopulate.js' in media_js)
            self.assertTrue('prepopulate.min.js' in media_js)
            self.assertFalse('actions.js' in media_js)
            self.assertTrue('actions.min.js' in media_js)
        with override_settings(DEBUG=True):
            media_js = str(ma.media['js'])
            self.assertTrue('jquery.js' in media_js)
            self.assertFalse('jquery.min.js' in media_js)
            self.assertTrue('prepopulate.js' in media_js)
            self.assertFalse('prepopulate.min.js' in media_js)
            self.assertTrue('actions.js' in media_js)
            self.assertFalse('actions.min.js' in media_js)

    def test_inlines_media_minified_only_if_debug_is_false(self):
        """
        Ensure that, with InlineModelAdmin, the minified versions of the JS
        files are only used when DEBUG is False.
        Refs #17521.
        """
        class InlineBandAdmin(InlineModelAdmin):
            model = Band

        ma = InlineBandAdmin(Band, self.site)
        ma.prepopulated_fields = ['something']
        ma.actions = ['some action']

        with override_settings(DEBUG=False):
            media_js = str(ma.media['js'])
            self.assertFalse('jquery.js' in media_js)
            self.assertTrue('jquery.min.js' in media_js)
            self.assertFalse('prepopulate.js' in media_js)
            self.assertTrue('prepopulate.min.js' in media_js)
            self.assertFalse('inlines.js' in media_js)
            self.assertTrue('inlines.min.js' in media_js)
        with override_settings(DEBUG=True):
            media_js = str(ma.media['js'])
            self.assertTrue('jquery.js' in media_js)
            self.assertFalse('jquery.min.js' in media_js)
            self.assertTrue('prepopulate.js' in media_js)
            self.assertFalse('prepopulate.min.js' in media_js)
            self.assertTrue('inlines.js' in media_js)
            self.assertFalse('inlines.min.js' in media_js)

 </s> add  </s> remove 
 </s> add     prepopulated_fields = {
        'title' : ('content',)
    }
    fieldsets=(
        ('Some fields', {
            'classes': ('collapse',),
            'fields': ('title', 'content')
        }),
        ('Some other fields', {
            'classes': ('wide',),
            'fields': ('date', 'section')
        })
    ) </s> remove         extra = "" if settings.DEBUG else ".min"
        js = ['jquery%s.js' % extra, 'jquery.init.js', "inlines%s.js" % extra]
 </s> add         extra = '' if settings.DEBUG else '.min'
        js = ['jquery%s.js' % extra, 'jquery.init.js', 'inlines%s.js' % extra] </s> remove         extra = "" if settings.DEBUG else ".min"
 </s> add         extra = '' if settings.DEBUG else '.min'
  import datetime
  import tempfile
  import os
  

  from django.contrib.auth.models import User
  from django.contrib.contenttypes import generic
  from django.contrib.contenttypes.models import ContentType
  from django.core.files.storage import FileSystemStorage
  from django.db import models
keep keep keep keep replace keep keep keep keep keep
 Improved on r17454 to ensure that `collapse.js` only gets minified when `DEBUG` is `False`.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17455 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
tests/regressiontests/admin_views/models.py