예제 #1
0
    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))
예제 #2
0
    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))
예제 #3
0
 def test_project_dict_no_project(self):
     self.assertEqual({}, admin.project_dict(None))
예제 #4
0
 def test_project_dict_no_project(self):
     self.assertEqual({}, admin.project_dict(None))