• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

Revisionce18b18506efe444a8908ba402d3073286ced926 (tree)
Time2012-04-17 01:23:24
AuthorEvgeny Ivanov <jey.ivanov@gmai...>
CommiterDave Brondsema

Log Message

t11: code cleaning

Change Summary

Incremental Difference

--- a/Allura/allura/tests/functional/test_wiki_macro.py
+++ b/Allura/allura/tests/functional/test_wiki_macro.py
@@ -26,40 +26,40 @@ class TestWikiMacro(TestController):
2626 projects_dict = dict([(p['name'],p[prop]) for p in projects])
2727 return [projects_dict[name] for name in names]
2828
29- # @td.with_wiki
30- # def test_sort_alpha(self):
31- # r = self.app.post('/p/wiki/Home/update',
32- # params={
33- # 'title': 'Home',
34- # 'text': '[[projects sort=alpha]]'
35- # },
36- # extra_environ=dict(username='root'), upload_files=[]).follow()
37- # project_list = self.get_project_names(r)
38- # assert project_list == sorted(project_list)
29+ @td.with_wiki
30+ def test_sort_alpha(self):
31+ r = self.app.post('/p/wiki/Home/update',
32+ params={
33+ 'title': 'Home',
34+ 'text': '[[projects sort=alpha]]'
35+ },
36+ extra_environ=dict(username='root'), upload_files=[]).follow()
37+ project_list = self.get_project_names(r)
38+ assert project_list == sorted(project_list)
3939
40- # @td.with_wiki
41- # def test_sort_registered(self):
42- # r = self.app.post('/p/wiki/Home/update',
43- # params={
44- # 'title': 'Home',
45- # 'text': '[[projects sort=last_registred]]'
46- # },
47- # extra_environ=dict(username='root'), upload_files=[]).follow()
48- # project_names = self.get_project_names(r)
49- # ids = self.get_projects_property_in_the_same_order(project_names, '_id')
50- # assert ids == sorted(ids, reverse=True)
40+ @td.with_wiki
41+ def test_sort_registered(self):
42+ r = self.app.post('/p/wiki/Home/update',
43+ params={
44+ 'title': 'Home',
45+ 'text': '[[projects sort=last_registred]]'
46+ },
47+ extra_environ=dict(username='root'), upload_files=[]).follow()
48+ project_names = self.get_project_names(r)
49+ ids = self.get_projects_property_in_the_same_order(project_names, '_id')
50+ assert ids == sorted(ids, reverse=True)
5151
52- # @td.with_wiki
53- # def test_sort_updated(self):
54- # r = self.app.post('/p/wiki/Home/update',
55- # params={
56- # 'title': 'Home',
57- # 'text': '[[projects sort=last_updated]]'
58- # },
59- # extra_environ=dict(username='root'), upload_files=[]).follow()
60- # project_names = self.get_project_names(r)
61- # updated_at = self.get_projects_property_in_the_same_order(project_names, 'last_updated')
62- # assert updated_at == sorted(updated_at, reverse=True)
52+ @td.with_wiki
53+ def test_sort_updated(self):
54+ r = self.app.post('/p/wiki/Home/update',
55+ params={
56+ 'title': 'Home',
57+ 'text': '[[projects sort=last_updated]]'
58+ },
59+ extra_environ=dict(username='root'), upload_files=[]).follow()
60+ project_names = self.get_project_names(r)
61+ updated_at = self.get_projects_property_in_the_same_order(project_names, 'last_updated')
62+ assert updated_at == sorted(updated_at, reverse=True)
6363
6464 @td.with_wiki
6565 def test_filtering(self):