32 def setup_database(self): |
32 def setup_database(self): |
33 self.auto_populate(10) |
33 self.auto_populate(10) |
34 |
34 |
35 def test_manual_tests(self): |
35 def test_manual_tests(self): |
36 rset = self.execute('Any P,F,S WHERE P is CWUser, P firstname F, P surname S') |
36 rset = self.execute('Any P,F,S WHERE P is CWUser, P firstname F, P surname S') |
37 self.view('table', rset, template=None, displayfilter=True, displaycols=[0,2]) |
37 self.view('table', rset, template=None, displayfilter=True, displaycols=[0,2]) |
38 |
38 |
39 def test_sortable_js_added(self): |
39 def test_sortable_js_added(self): |
40 rset = self.execute('CWUser X') |
40 rset = self.execute('CWUser X') |
41 # sortable.js should not be included by default |
41 # sortable.js should not be included by default |
42 self.failIf('jquery.tablesorter.js' in self.view('oneline', rset)) |
42 self.failIf('jquery.tablesorter.js' in self.view('oneline', rset)) |
52 self.assertEquals(source.count('spam.js'), 1) |
52 self.assertEquals(source.count('spam.js'), 1) |
53 |
53 |
54 |
54 |
55 |
55 |
56 class ExplicitViewsTest(WebTest): |
56 class ExplicitViewsTest(WebTest): |
57 |
57 |
58 def test_unrelateddivs(self): |
58 def test_unrelateddivs(self): |
59 rset = self.execute('Any X WHERE X is CWUser, X login "admin"') |
59 rset = self.execute('Any X WHERE X is CWUser, X login "admin"') |
60 group = self.add_entity('CWGroup', name=u'R&D') |
60 group = self.add_entity('CWGroup', name=u'R&D') |
61 req = self.request(relation='in_group_subject') |
61 req = self.request(relation='in_group_subject') |
62 self.view('unrelateddivs', rset, req) |
62 self.view('unrelateddivs', rset, req) |
63 |
63 |
64 |
|
65 |
64 |
66 if __name__ == '__main__': |
65 if __name__ == '__main__': |
67 from logilab.common.testlib import unittest_main |
66 from logilab.common.testlib import unittest_main |
68 unittest_main() |
67 unittest_main() |