예제 #1
0
파일: tests.py 프로젝트: bartdag/recodoc2
 def setUp(self):
     logging.basicConfig(level=logging.WARNING)
     settings.PROJECT_FS_ROOT = settings.PROJECT_FS_ROOT_TEST
     create_project_local('project1')
     create_project_db('Project 1', 'http://www.example1.com', 'project1')
     create_release_db('project1', '3.0', True)
     create_release_db('project1', '3.1')
예제 #2
0
 def setUp(self):
     logging.basicConfig(level=logging.WARNING)
     settings.PROJECT_FS_ROOT = settings.PROJECT_FS_ROOT_TEST
     create_project_local('project1')
     create_project_db('Project 1', 'http://www.example1.com', 'project1')
     create_release_db('project1', '3.0', True)
     create_release_db('project1', '3.1')
예제 #3
0
파일: tests.py 프로젝트: bartdag/recodoc2
 def setUp(self):
     logging.basicConfig(level=logging.WARNING)
     create_code_element_kinds()
     self.project = create_project_db('Project 1', 'http://www.example1.com',
             'project1')
     create_release_db('project1', '3.0', True)
     create_release_db('project1', '3.1')
예제 #4
0
 def setUp(self):
     logging.basicConfig(level=logging.WARNING)
     create_code_element_kinds()
     self.project = create_project_db('Project 1',
                                      'http://www.example1.com', 'project1')
     create_release_db('project1', '3.0', True)
     create_release_db('project1', '3.1')
예제 #5
0
 def setUp(self):
     DEBUG_LOG.clear()
     cu.clear_cache()
     self.pname = 'project1'
     self.release = '3.0'
     logging.basicConfig(level=logging.WARNING)
     create_code_element_kinds()
     self.project = create_project_db('Project 1',
             'http://www.example1.com', self.pname)
     self.releasedb = create_release_db(self.pname, self.release, True)
     create_release_db(self.pname, '3.1')
     self.ann_kind = CodeElementKind.objects.get(kind='annotation')
     self.class_kind = CodeElementKind.objects.get(kind='class')
     self.enum_kind = CodeElementKind.objects.get(kind='enumeration')
     self.method_kind = CodeElementKind.objects.get(kind='method')
     self.ann_field_kind = CodeElementKind.objects.get(
             kind='annotation field')
     self.enum_value_kind = CodeElementKind.objects.get(
             kind='enumeration value')
     self.field_kind = CodeElementKind.objects.get(kind='field')
     self.code_refs = []
     self.code_snippets = []
예제 #6
0
파일: tests.py 프로젝트: bartdag/recodoc2
    def testCreateProjectDBNonUnique(self):
        create_project_db("Project 1", "http://www.example1.com", "project1")

        try:
            sid = transaction.savepoint()
            create_project_db("Project 1", "http://www.example1.com", "project2")
            self.fail("Should have failed!")
        except:
            transaction.savepoint_rollback(sid)
            self.assertTrue(True)

        try:
            sid = transaction.savepoint()
            create_project_db("Project 2", "http://www.example1.com", "project1")
            self.fail("Should have failed!")
        except:
            transaction.savepoint_rollback(sid)
            self.assertTrue(True)

        self.assertEqual(1, Project.objects.count())
예제 #7
0
    def testCreateProjectDBNonUnique(self):
        create_project_db('Project 1', 'http://www.example1.com', 'project1')

        try:
            sid = transaction.savepoint()
            create_project_db('Project 1', 'http://www.example1.com',
                              'project2')
            self.fail('Should have failed!')
        except:
            transaction.savepoint_rollback(sid)
            self.assertTrue(True)

        try:
            sid = transaction.savepoint()
            create_project_db('Project 2', 'http://www.example1.com',
                              'project1')
            self.fail('Should have failed!')
        except:
            transaction.savepoint_rollback(sid)
            self.assertTrue(True)

        self.assertEqual(1, Project.objects.count())
예제 #8
0
파일: tests.py 프로젝트: bartdag/recodoc2
 def testListProjectsDB(self):
     create_project_db("Project 1", "http://www.example1.com", "project1")
     create_project_db("Project 2", "http://www.example1.com", "project2")
     self.assertEqual(2, len(list_projects_db()))
예제 #9
0
파일: tests.py 프로젝트: bartdag/recodoc2
 def testCreateProjectRelease(self):
     create_project_db("Project 1", "http://www.example1.com", "project1")
     create_release_db("project1", "3.0", True)
     create_release_db("project1", "3.1")
     self.assertTrue(2, ProjectRelease.objects.count())
예제 #10
0
파일: tests.py 프로젝트: bartdag/recodoc2
 def testCreateProjectDB(self):
     create_project_db("Project 1", "http://www.example1.com", "project1")
     create_project_db("Project 2", "http://www.example1.com", "project2")
     self.assertEqual(2, Project.objects.count())
예제 #11
0
 def testListProjectsDB(self):
     create_project_db('Project 1', 'http://www.example1.com', 'project1')
     create_project_db('Project 2', 'http://www.example1.com', 'project2')
     self.assertEqual(2, len(list_projects_db()))
예제 #12
0
 def testCreateProjectRelease(self):
     create_project_db('Project 1', 'http://www.example1.com', 'project1')
     create_release_db('project1', '3.0', True)
     create_release_db('project1', '3.1')
     self.assertTrue(2, ProjectRelease.objects.count())
예제 #13
0
 def testCreateProjectDB(self):
     create_project_db('Project 1', 'http://www.example1.com', 'project1')
     create_project_db('Project 2', 'http://www.example1.com', 'project2')
     self.assertEqual(2, Project.objects.count())
예제 #14
0
 def handle_noargs(self, **options):
     create_project_db(smart_decode(options.get('pfullname')),
                       smart_decode(options.get('url')),
                       smart_decode(options.get('pname')))
     if (options.get('local', False)):
         create_project_local(smart_decode(options.get('pname')))
예제 #15
0
 def handle_noargs(self, **options):
     create_project_db(smart_decode(options.get('pfullname')),
                       smart_decode(options.get('url')),
                       smart_decode(options.get('pname')))
     if (options.get('local', False)):
         create_project_local(smart_decode(options.get('pname')))