Mercurial > kallithea
changeset 3844:ec64c396da8c beta
added tests for gist expiration
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 11 May 2013 23:24:08 +0200 |
parents | ad4a680113b7 |
children | 0a023c381350 |
files | rhodecode/tests/functional/test_admin_gists.py |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_admin_gists.py Sat May 11 23:19:06 2013 +0200 +++ b/rhodecode/tests/functional/test_admin_gists.py Sat May 11 23:24:08 2013 +0200 @@ -1,3 +1,5 @@ +import datetime + from rhodecode.tests import * from rhodecode.model.gist import GistModel from rhodecode.model.meta import Session @@ -73,6 +75,15 @@ response.mustcontain('gist test') response.mustcontain('<div class="ui-btn green badge">Public gist</div>') + def test_access_expired_gist(self): + self.log_user() + gist = _create_gist('never-see-me') + gist.gist_expires = 0 # 1970 + Session().add(gist) + Session().commit() + + response = self.app.get(url('gist', id=gist.gist_access_id), status=404) + def test_create_private(self): self.log_user() response = self.app.post(url('gists'),