Changeset - 45e1fdc0082c
[Not reviewed]
default
0 7 0
Marcin Kuzminski - 15 years ago 2010-11-02 20:19:05
marcin@python-works.com
Version bump,freeze of dependent libs.
Little test update
7 files changed with 19 insertions and 13 deletions:
0 comments (0 inline, 0 general)
rhodecode/__init__.py
Show inline comments
 
@@ -21,13 +21,13 @@
 
Created on April 9, 2010
 
RhodeCode, a web based repository management based on pylons
 
versioning implementation: http://semver.org/
 
@author: marcink
 
"""
 

	
 
VERSION = (1, 0, 0, 'rc4')
 
VERSION = (1, 0, 0,)
 

	
 
__version__ = '.'.join((str(each) for each in VERSION[:4]))
 

	
 
def get_version():
 
    """
 
    Returns shorter version (digit parts only) as string.
rhodecode/lib/utils.py
Show inline comments
 
@@ -457,12 +457,13 @@ def create_test_env(repos_test_path, con
 
    install test repository into tmp dir
 
    """
 
    from rhodecode.lib.db_manage import DbManage
 
    import tarfile
 
    import shutil
 
    from os.path import dirname as dn, join as jn, abspath
 
    from rhodecode.tests import REPO_PATH, NEW_REPO_PATH
 

	
 
    log = logging.getLogger('TestEnvCreator')
 
    # create logger
 
    log.setLevel(logging.DEBUG)
 
    log.propagate = True
 
    # create console handler and set level to debug
 
@@ -490,13 +491,17 @@ def create_test_env(repos_test_path, con
 
    dbmanage.admin_prompt()
 
    dbmanage.create_permissions()
 
    dbmanage.populate_default_permissions()
 

	
 
    #PART TWO make test repo
 
    log.debug('making test vcs repo')
 
    if os.path.isdir('/tmp/vcs_test'):
 
        shutil.rmtree('/tmp/vcs_test')
 
    if os.path.isdir(REPO_PATH):
 
        log.debug('REMOVING %s', REPO_PATH)
 
        shutil.rmtree(REPO_PATH)
 
    if os.path.isdir(NEW_REPO_PATH):
 
        log.debug('REMOVING %s', NEW_REPO_PATH)
 
        shutil.rmtree(NEW_REPO_PATH)
 

	
 
    cur_dir = dn(dn(abspath(__file__)))
 
    tar = tarfile.open(jn(cur_dir, 'tests', "vcs_test.tar.gz"))
 
    tar.extractall('/tmp')
 
    tar.close()
rhodecode/templates/search/search_content.html
Show inline comments
 
@@ -22,10 +22,10 @@
 
        </div>      
 
        %endif
 
        
 
    %endif      
 
%endfor
 
%if c.cur_query and c.formated_results:
 
<div class="pagination-wh pagination-left">
 
<div class="pagination-wh pagination-left" style="padding-left:16px">
 
    ${c.formated_results.pager('$link_previous ~2~ $link_next')}
 
</div>  
 
%endif
 
\ No newline at end of file
rhodecode/tests/__init__.py
Show inline comments
 
@@ -15,13 +15,12 @@ from pylons import config, url
 
from routes.util import URLGenerator
 
from webtest import TestApp
 
import os
 
from rhodecode.model import meta
 
import logging
 

	
 

	
 
log = logging.getLogger(__name__) 
 

	
 
import pylons.test
 

	
 
__all__ = ['environ', 'url', 'TestController']
 

	
 
@@ -29,12 +28,15 @@ __all__ = ['environ', 'url', 'TestContro
 
#SetupCommand('setup-app').run([config_file])
 

	
 
##RUNNING DESIRED TESTS
 
#nosetests rhodecode.tests.functional.test_admin_settings:TestSettingsController.test_my_account
 

	
 
environ = {}
 
TEST_DIR = '/tmp'
 
REPO_PATH = os.path.join(TEST_DIR, 'vcs_test')
 
NEW_REPO_PATH = os.path.join(TEST_DIR, 'vcs_test_new')
 

	
 
class TestController(TestCase):
 

	
 
    def __init__(self, *args, **kwargs):
 
        wsgiapp = pylons.test.pylonsapp
 
        config = wsgiapp.config
rhodecode/tests/functional/test_changelog.py
Show inline comments
 
@@ -3,13 +3,12 @@ from rhodecode.tests import *
 
class TestChangelogController(TestController):
 

	
 
    def test_index(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='changelog', action='index', repo_name='vcs_test'))
 
        
 
        print response
 
        assert """<div id="chg_20" class="container">""" in response.body, 'wrong info about number ofchanges'
 
        assert """Small update at simplevcs app""" in response.body, 'missing info about commit message'
 
        assert """<span class="removed" title="removed">0</span>""" in response.body, 'wrong info about removed nodes'
 
        assert """<span class="changed" title="changed">2</span>""" in response.body, 'wrong info about changed nodes'
 
        assert """<span class="added" title="added">1</span>""" in response.body, 'wrong info about added nodes'
 
        
 
@@ -24,8 +23,8 @@ class TestChangelogController(TestContro
 
        # Test response after pagination...
 

	
 
        assert """<span class="removed" title="removed">20</span>"""in response.body, 'wrong info about number of removed'
 
        assert """<span class="changed" title="changed">1</span>"""in response.body, 'wrong info about number of changes'
 
        assert """<span class="added" title="added">0</span>"""in response.body, 'wrong info about number of added'
 
        assert """<div class="date">commit 64: 46ad32a4f974@2010-04-20 00:33:21</div>"""in response.body, 'wrong info about commit 64'
 

	
 
        assert """<div class="message"><a href="/vcs_test/changeset/46ad32a4f974">Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4</a></div>"""in response.body, 'wrong info about commit 64 is a merge'
 
        
setup.cfg
Show inline comments
 
[egg_info]
 
tag_build = rc4
 
tag_build = 
 
tag_svn_revision = true
 

	
 
[easy_install]
 
find_links = http://www.pylonshq.com/download/
 

	
 
[nosetests]
setup.py
Show inline comments
 
from rhodecode import get_version
 
import sys
 
py_version = sys.version_info
 

	
 
requirements = [
 
        "Pylons>=1.0.0",
 
        "SQLAlchemy>=0.6",
 
        "SQLAlchemy==0.6.4",
 
        "Mako>=0.3.2",
 
        "vcs==0.1.8",
 
        "pygments>=1.3.0",
 
        "mercurial>=1.6",
 
        "whoosh==1.0.0",
 
        "celery>=2.0.0",
 
        "mercurial==1.6.4",
 
        "whoosh==1.2.5",
 
        "celery==2.1.2",
 
        "py-bcrypt",
 
        "babel",
 
    ]
 

	
 
classifiers = ['Development Status :: 4 - Beta',
 
classifiers = ["Development Status :: 5 - Production/Stable",
 
                   'Environment :: Web Environment',
 
                   'Framework :: Pylons',
 
                   'Intended Audience :: Developers',
 
                   'License :: OSI Approved :: BSD License',
 
                   'Operating System :: OS Independent',
 
                   'Programming Language :: Python', ]
0 comments (0 inline, 0 general)