~mvo/software-center/oneconf-lp981536

« back to all changes in this revision

Viewing changes to test/mago/basic.py

merge with trunk and many fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
import ldtp
3
3
import ooldtp
4
4
import ldtputils
 
5
import logging
5
6
import os
6
7
 
7
8
# import the TestSuite class
16
17
    def do_search(self, search_term):
17
18
        application = ooldtp.context(self.name)
18
19
        # get search entry
19
 
        component = application.getchild("Search")
20
 
        # XXX add search with search_term
 
20
        search = application.getchild("txtSearch")
 
21
        search.enterstring("ab")
 
22
        # check label
 
23
        label = application.getchild("status_text")
 
24
        label_str = label.gettextvalue()
 
25
        # make sure ab always hits the query limit (200 currently)
 
26
        if label_str != "200 matching items":
 
27
            return False
21
28
        return True
22
29
 
23
30
 
34
41
 
35
42
    def test_search(self, search_term):
36
43
        if self.application.do_search(search_term) == False:
 
44
            print "do_search test failed"
37
45
            raise AssertionError, "Search failed"
38
46
 
39
47
if __name__ == "__main__":