This second assertion isn't what you want (It'll pass before and after the code change I believe.) Instead, you should be setting `INSTALLED_APPS` to a tuple with duplicates and using `with self.assertRaises(ImproperlyConfigured)`