##// END OF EJS Templates
fixed tests
marcink -
r1900:8c6d62a8 default
parent child Browse files
Show More
@@ -1,47 +1,47 b''
1 1 from rhodecode.tests import *
2 2 from rhodecode.model.db import Repository
3 3 from rhodecode.lib.utils import invalidate_cache
4 4
5 5
6 6 class TestSummaryController(TestController):
7 7
8 8 def test_index(self):
9 9 self.log_user()
10 10 response = self.app.get(url(controller='summary',
11 11 action='index', repo_name=HG_REPO))
12 12
13 13 #repo type
14 14 self.assertTrue("""<img style="margin-bottom:2px" class="icon" """
15 15 """title="Mercurial repository" alt="Mercurial """
16 16 """repository" src="/images/icons/hgicon.png"/>"""
17 17 in response.body)
18 18 self.assertTrue("""<img style="margin-bottom:2px" class="icon" """
19 19 """title="public repository" alt="public """
20 20 """repository" src="/images/icons/lock_open.png"/>"""
21 21 in response.body)
22 22
23 23 #codes stats
24 24 self._enable_stats()
25 25
26 26 invalidate_cache('get_repo_cached_%s' % HG_REPO)
27 27 response = self.app.get(url(controller='summary', action='index',
28 28 repo_name=HG_REPO))
29 29
30 30 response.mustcontain(
31 """var data = {"py": {"count": 42, "desc": """
32 """["Python"]}, "rst": {"count": 11, "desc": """
33 """["Rst"]}, "sh": {"count": 2, "desc": ["Bash"]}, """
34 """"makefile": {"count": 1, "desc": ["Makefile", """
35 """"Makefile"]}, "cfg": {"count": 1, "desc": ["Ini"]},"""
36 """ "css": {"count": 1, "desc": ["Css"]}, "bat": """
37 """{"count": 1, "desc": ["Batch"]}};"""
31 """var data = [["py", {"count": 42, "desc": ["Python"]}], """
32 """["rst", {"count": 11, "desc": ["Rst"]}], """
33 """["sh", {"count": 2, "desc": ["Bash"]}], """
34 """["makefile", {"count": 1, "desc": ["Makefile", "Makefile"]}],"""
35 """ ["cfg", {"count": 1, "desc": ["Ini"]}], """
36 """["css", {"count": 1, "desc": ["Css"]}], """
37 """["bat", {"count": 1, "desc": ["Batch"]}]];"""
38 38 )
39 39
40 40 # clone url...
41 41 response.mustcontain("""<input type="text" id="clone_url" readonly="readonly" value="hg clone http://test_admin@localhost:80/%s" size="70"/>""" % HG_REPO)
42 42
43 43 def _enable_stats(self):
44 44 r = Repository.get_by_repo_name(HG_REPO)
45 45 r.enable_statistics = True
46 46 self.sa.add(r)
47 47 self.sa.commit()
General Comments 0
You need to be logged in to leave comments. Login now