'The minified versions of the JS files are only used when DEBUG is False.'

def test_js_minified_only_if_debug_is_false(self):

    with override_settings(DEBUG=False):
        response = self.client.get(reverse('admin:admin_views_section_add'))
        self.assertNotContains(response, 'vendor/jquery/jquery.js')
        self.assertContains(response, 'vendor/jquery/jquery.min.js')
        self.assertNotContains(response, 'prepopulate.js')
        self.assertContains(response, 'prepopulate.min.js')
        self.assertNotContains(response, 'actions.js')
        self.assertContains(response, 'actions.min.js')
        self.assertNotContains(response, 'collapse.js')
        self.assertContains(response, 'collapse.min.js')
        self.assertNotContains(response, 'inlines.js')
        self.assertContains(response, 'inlines.min.js')
    with override_settings(DEBUG=True):
        response = self.client.get(reverse('admin:admin_views_section_add'))
        self.assertContains(response, 'vendor/jquery/jquery.js')
        self.assertNotContains(response, 'vendor/jquery/jquery.min.js')
        self.assertContains(response, 'prepopulate.js')
        self.assertNotContains(response, 'prepopulate.min.js')
        self.assertContains(response, 'actions.js')
        self.assertNotContains(response, 'actions.min.js')
        self.assertContains(response, 'collapse.js')
        self.assertNotContains(response, 'collapse.min.js')
        self.assertContains(response, 'inlines.js')
        self.assertNotContains(response, 'inlines.min.js')
