Mercurial > kallithea
annotate rhodecode/tests/functional/test_home.py @ 1506:7865043e4ca9 beta
fixed broken check_repo on middlewares
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 01 Oct 2011 21:40:34 +0300 |
parents | 605707b50d7c |
children | ef0613584ced |
rev | line source |
---|---|
547
1e757ac98988
renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
464
diff
changeset
|
1 from rhodecode.tests import * |
462
298546182b41
more test suites on login, fixed strange detached instance bug found during in tests.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
691
7486da5f0628
Refactor codes for scm model
Marcin Kuzminski <marcin@python-works.com>
parents:
688
diff
changeset
|
3 class TestHomeController(TestController): |
462
298546182b41
more test suites on login, fixed strange detached instance bug found during in tests.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 |
298546182b41
more test suites on login, fixed strange detached instance bug found during in tests.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 def test_index(self): |
464
cbe777be5b8c
some more basic tests
Marcin Kuzminski <marcin@python-works.com>
parents:
462
diff
changeset
|
6 self.log_user() |
688
8acbfa837180
Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
7 response = self.app.get(url(controller='home', action='index')) |
464
cbe777be5b8c
some more basic tests
Marcin Kuzminski <marcin@python-works.com>
parents:
462
diff
changeset
|
8 #if global permission is set |
1481
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
9 self.assertTrue('ADD NEW REPOSITORY' in response.body) |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
10 self.assertTrue('href="/%s/summary"' % HG_REPO in response.body) |
464
cbe777be5b8c
some more basic tests
Marcin Kuzminski <marcin@python-works.com>
parents:
462
diff
changeset
|
11 # Test response... |
875 | 12 |
1481
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
13 self.assertTrue("""<img class="icon" title="Mercurial repository" """ |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
14 """alt="Mercurial repository" src="/images/icons/hg""" |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
15 """icon.png"/>""" in response.body) |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
16 self.assertTrue("""<img class="icon" title="public repository" """ |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
17 """alt="public repository" src="/images/icons/lock_""" |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
18 """open.png"/>""" in response.body) |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
19 |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
20 self.assertTrue("""<a title="Marcin Kuzminski <marcin@python-works.com> |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
21 merge" class="tooltip" href="/vcs_test_hg/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">r173:27cd5cce30c9</a>""" |
605707b50d7c
test fixes for vcs update
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
22 in response.body) |