def test_get_empty_models_if_spec_in_conf(self):
     old_value = conf.AUTO_ADMIN_READONLY_CT
     conf.AUTO_ADMIN_READONLY_CT = ()
     tools.assert_equals([], get_models())
     conf.AUTO_ADMIN_READONLY_CT = old_value
 def test_get_all_models_if_spec_in_conf(self):
     old_value = conf.AUTO_ADMIN_READONLY_CT
     conf.AUTO_ADMIN_READONLY_CT = '__all__'
     tools.assert_equals(apps.get_models(), get_models())
     conf.AUTO_ADMIN_READONLY_CT = old_value
 def test_get_models_for_content_types_spec_in_settings(self):
     tools.assert_equals([
         ContentType.objects.get_by_natural_key(
             *settings.ADMIN_EXTRAS_AUTO_ADMIN_READONLY_CT[0].split(
                 '.')).model_class()
     ], get_models())
 def test_get_empty_models_if_spec_in_conf(self):
     old_value = conf.AUTO_ADMIN_READONLY_CT
     conf.AUTO_ADMIN_READONLY_CT = ()
     tools.assert_equals([], get_models())
     conf.AUTO_ADMIN_READONLY_CT = old_value
 def test_get_all_models_if_spec_in_conf(self):
     old_value = conf.AUTO_ADMIN_READONLY_CT
     conf.AUTO_ADMIN_READONLY_CT = '__all__'
     tools.assert_equals(apps.get_models(), get_models())
     conf.AUTO_ADMIN_READONLY_CT = old_value
 def test_get_models_for_content_types_spec_in_settings(self):
     tools.assert_equals(
         [ContentType.objects.get_by_natural_key(*settings.ADMIN_EXTRAS_AUTO_ADMIN_READONLY_CT[0].split('.')).model_class()],
         get_models()
     )