def test_root_urlconf(self): """Tests the ability to retrieve the project name from the ROOT_URLCONF""" self.old_root_urlconf = settings.ROOT_URLCONF settings.PROJECT_NAME = '' settings.ROOT_URLCONF = 'foobar.urls' self.assertEqual(utils._get_project_name(), 'foobar') settings.ROOT_URLCONF = self.old_root_urlconf
def test_project_name(self): """Tests the ability to retrieve the project name from the PROJECT_NAME setting""" self.assertEqual(utils._get_project_name(), 'foobar')