Changeset - 83dbf427f1dc
[Not reviewed]
default
0 1 0
domruf - 10 years ago 2016-03-02 18:51:58
dominikruf@gmail.com
tests: load fixture in binary mode - otherwise \r would be filtered on Windows
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/fixture.py
Show inline comments
 
@@ -250,25 +250,25 @@ class Fixture(object):
 
        return gist
 

	
 
    def destroy_gists(self, gistid=None):
 
        for g in GistModel.cls.get_all():
 
            if gistid:
 
                if gistid == g.gist_access_id:
 
                    GistModel().delete(g)
 
            else:
 
                GistModel().delete(g)
 
        Session().commit()
 

	
 
    def load_resource(self, resource_name, strip=True):
 
        with open(os.path.join(FIXTURES, resource_name)) as f:
 
        with open(os.path.join(FIXTURES, resource_name), 'rb') as f:
 
            source = f.read()
 
            if strip:
 
                source = source.strip()
 

	
 
        return source
 

	
 
    def commit_change(self, repo, filename, content, message, vcs_type, parent=None, newfile=False):
 
        repo = Repository.get_by_repo_name(repo)
 
        _cs = parent
 
        if not parent:
 
            _cs = EmptyChangeset(alias=vcs_type)
 

	
0 comments (0 inline, 0 general)