##// END OF EJS Templates
fixed broken test after latest changes
marcink -
r782:51127b2e beta
parent child Browse files
Show More
@@ -30,7 +30,7 b' import pylons.test'
30 30 #SetupCommand('setup-app').run([config_file])
31 31
32 32 ##RUNNING DESIRED TESTS
33 #nosetests rhodecode.tests.functional.test_admin_settings:TestSettingsController.test_my_account
33 #nosetests -x rhodecode.tests.functional.test_admin_settings:TestSettingsController.test_my_account
34 34
35 35 environ = {}
36 36
@@ -71,7 +71,7 b' class TestAdminSettingsController(TestCo'
71 71 email=new_email,))
72 72 response.follow()
73 73
74 assert 'Your account was updated succesfully' in response.session['flash'][0][1], 'no flash message about success of change'
74 assert 'Your account was updated successfully' in response.session['flash'][0][1], 'no flash message about success of change'
75 75 user = self.sa.query(User).filter(User.username == 'test_admin').one()
76 76 assert user.email == new_email , 'incorrect user email after update got %s vs %s' % (user.email, new_email)
77 77 assert user.name == new_name, 'updated field mismatch %s vs %s' % (user.name, new_name)
@@ -94,7 +94,7 b' class TestAdminSettingsController(TestCo'
94 94 email=old_email,))
95 95
96 96 response.follow()
97 assert 'Your account was updated succesfully' in response.session['flash'][0][1], 'no flash message about success of change'
97 assert 'Your account was updated successfully' in response.session['flash'][0][1], 'no flash message about success of change'
98 98 user = self.sa.query(User).filter(User.username == 'test_admin').one()
99 99 assert user.email == old_email , 'incorrect user email after update got %s vs %s' % (user.email, old_email)
100 100
@@ -74,7 +74,7 b' class TestFilesController(TestController'
74 74 f_path='vcs/nodes.py'))
75 75
76 76 #test or history
77 assert """<select id="diff1" name="diff1">
77 assert """<optgroup label="Changesets">
78 78 <option selected="selected" value="8911406ad776fdd3d0b9932a2e89677e57405a48">r167:8911406ad776</option>
79 79 <option value="aa957ed78c35a1541f508d2ec90e501b0a9e3167">r165:aa957ed78c35</option>
80 80 <option value="48e11b73e94c0db33e736eaeea692f990cb0b5f1">r140:48e11b73e94c</option>
@@ -108,7 +108,19 b' class TestFilesController(TestController'
108 108 <option value="536c1a19428381cfea92ac44985304f6a8049569">r24:536c1a194283</option>
109 109 <option value="dc5d2c0661b61928834a785d3e64a3f80d3aad9c">r8:dc5d2c0661b6</option>
110 110 <option value="3803844fdbd3b711175fc3da9bdacfcd6d29a6fb">r7:3803844fdbd3</option>
111 </select>""" in response.body
111 </optgroup>
112 <optgroup label="Branches">
113 <option value="27cd5cce30c96924232dffcd24178a07ffeb5dfc">default</option>
114 <option value="97e8b885c04894463c51898e14387d80c30ed1ee">git</option>
115 <option value="2e6a2bf9356ca56df08807f4ad86d480da72a8f4">web</option>
116 </optgroup>
117 <optgroup label="Tags">
118 <option value="27cd5cce30c96924232dffcd24178a07ffeb5dfc">tip</option>
119 <option value="fd4bdb5e9b2a29b4393a4ac6caef48c17ee1a200">0.1.4</option>
120 <option value="17544fbfcd33ffb439e2b728b5d526b1ef30bfcf">0.1.3</option>
121 <option value="a7e60bff65d57ac3a1a1ce3b12a70f8a9e8a7720">0.1.2</option>
122 <option value="eb3a60fc964309c1a318b8dfe26aa2d1586c85ae">0.1.1</option>
123 </optgroup>""" in response.body
112 124
113 125
114 126 assert """<div class="commit">"Partially implemented #16. filecontent/commit message/author/node name are safe_unicode now.
@@ -126,8 +138,9 b' removed extra unicode conversion in diff'
126 138 revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc',
127 139 f_path='vcs/nodes.py'))
128 140
129
130 assert """<option selected="selected" value="8911406ad776fdd3d0b9932a2e89677e57405a48">r167:8911406ad776</option>
141 print response.body
142 assert """<optgroup label="Changesets">
143 <option selected="selected" value="8911406ad776fdd3d0b9932a2e89677e57405a48">r167:8911406ad776</option>
131 144 <option value="aa957ed78c35a1541f508d2ec90e501b0a9e3167">r165:aa957ed78c35</option>
132 145 <option value="48e11b73e94c0db33e736eaeea692f990cb0b5f1">r140:48e11b73e94c</option>
133 146 <option value="adf3cbf483298563b968a6c673cd5bde5f7d5eea">r126:adf3cbf48329</option>
@@ -160,6 +173,18 b' removed extra unicode conversion in diff'
160 173 <option value="536c1a19428381cfea92ac44985304f6a8049569">r24:536c1a194283</option>
161 174 <option value="dc5d2c0661b61928834a785d3e64a3f80d3aad9c">r8:dc5d2c0661b6</option>
162 175 <option value="3803844fdbd3b711175fc3da9bdacfcd6d29a6fb">r7:3803844fdbd3</option>
163 </select>""" in response.body, 'missing history in annotation'
176 </optgroup>
177 <optgroup label="Branches">
178 <option value="27cd5cce30c96924232dffcd24178a07ffeb5dfc">default</option>
179 <option value="97e8b885c04894463c51898e14387d80c30ed1ee">git</option>
180 <option value="2e6a2bf9356ca56df08807f4ad86d480da72a8f4">web</option>
181 </optgroup>
182 <optgroup label="Tags">
183 <option value="27cd5cce30c96924232dffcd24178a07ffeb5dfc">tip</option>
184 <option value="fd4bdb5e9b2a29b4393a4ac6caef48c17ee1a200">0.1.4</option>
185 <option value="17544fbfcd33ffb439e2b728b5d526b1ef30bfcf">0.1.3</option>
186 <option value="a7e60bff65d57ac3a1a1ce3b12a70f8a9e8a7720">0.1.2</option>
187 <option value="eb3a60fc964309c1a318b8dfe26aa2d1586c85ae">0.1.1</option>
188 </optgroup>""" in response.body, 'missing or wrong history in annotation'
164 189
165 190 assert """<span style="text-transform: uppercase;"><a href="#">branch: default</a></span>""" in response.body, 'missing or wrong branch info'
@@ -11,7 +11,9 b' class TestSummaryController(TestControll'
11 11 assert """<img style="margin-bottom:2px" class="icon" title="public repository" alt="public repository" src="/images/icons/lock_open.png"/>""" in response.body
12 12
13 13 #codes stats
14 assert """var data = {"text/x-python": 42, "text/plain": 12};""" in response.body, 'wrong info about % of codes stats'
14 assert """var data = {"Python": 42, "Rst": 11, "Bash": 2, "Makefile": 1, "Batch": 1, "Ini": 1, "Css": 1};""" in response.body, 'wrong info about % of codes stats'
15 15
16 16 # clone url...
17 17 assert """<input type="text" id="clone_url" readonly="readonly" value="hg clone http://test_admin@localhost:80/%s" size="70"/>""" % HG_REPO in response.body
18
19
General Comments 0
You need to be logged in to leave comments. Login now