def test_project_dict(self): project = type('Project', (object,), {'id': 'project', 'project_manager_id': 'foo', 'description': 'bar'}) expected_project_dict = {'projectname': 'project', 'project_manager_id': 'foo', 'description': 'bar'} self.assertEqual(expected_project_dict, admin.project_dict(project))
def test_project_dict(self): project = type('Project', (object, ), { 'id': 'project', 'project_manager_id': 'foo', 'description': 'bar' }) expected_project_dict = { 'projectname': 'project', 'project_manager_id': 'foo', 'description': 'bar' } self.assertEqual(expected_project_dict, admin.project_dict(project))
def test_project_dict_no_project(self): self.assertEqual({}, admin.project_dict(None))