Changeset - b1d6478d4561
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2011-02-12 21:22:30
marcin@python-works.com
added repo creation filesystem test
1 file changed with 16 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/tests/functional/test_admin_repos.py
Show inline comments
 
import os
 
import vcs
 

	
 
from rhodecode.model.db import Repository
 
from rhodecode.tests import *
 

	
 
class TestAdminReposController(TestController):
 

	
 
    def test_index(self):
 
@@ -33,12 +36,20 @@ class TestAdminReposController(TestContr
 

	
 
        #test if repository is visible in the list ?
 
        response = response.follow()
 

	
 
        assert repo_name in response.body, 'missing new repo from the main repos list'
 

	
 

	
 
        #test if repository was created on filesystem
 
        try:
 
            vcs.get_repo(os.path.join(TESTS_TMP_PATH, repo_name))
 
        except:
 
            assert False , 'no repo in filesystem'
 

	
 

	
 
    def test_create_git(self):
 
        return
 
        self.log_user()
 
        repo_name = NEW_GIT_REPO
 
        description = 'description for newly created repo'
 
        private = False
 
@@ -59,12 +70,17 @@ class TestAdminReposController(TestContr
 

	
 
        #test if repository is visible in the list ?
 
        response = response.follow()
 

	
 
        assert repo_name in response.body, 'missing new repo from the main repos list'
 

	
 
        #test if repository was created on filesystem
 
        try:
 
            vcs.get_repo(os.path.join(TESTS_TMP_PATH, repo_name))
 
        except:
 
            assert False , 'no repo in filesystem'
 

	
 
    def test_new(self):
 
        self.log_user()
 
        response = self.app.get(url('new_repo'))
 

	
 
    def test_new_as_xml(self):
0 comments (0 inline, 0 general)