@@ -38,8 +38,11 @@ def clicomm(self, argstr, expectexc=False, bz=None):
3838 def _testBZVersion (self ):
3939 bz = Bugzilla (self .url , use_creds = False )
4040 self .assertEquals (bz .__class__ , self .bzclass )
41- self .assertEquals (bz .bz_ver_major , self .bzversion [0 ])
42- self .assertEquals (bz .bz_ver_minor , self .bzversion [1 ])
41+ if tests .REDHAT_URL :
42+ print ("BZ version=%s.%s" % (bz .bz_ver_major , bz .bz_ver_minor ))
43+ else :
44+ self .assertEquals (bz .bz_ver_major , self .bzversion [0 ])
45+ self .assertEquals (bz .bz_ver_minor , self .bzversion [1 ])
4346
4447 # Since we are running these tests against bugzilla instances in
4548 # the wild, we can't depend on certain data like product lists
@@ -112,7 +115,12 @@ def _testQueryFormat(self, args, expectstr):
112115 out = self .clicomm ("query %s" % args )
113116 self .assertTrue (expectstr in out )
114117
115- def _testQueryURL (self , url , count , expectstr ):
118+ def _testQueryURL (self , querystr , count , expectstr ):
119+ url = self .url
120+ if "/xmlrpc.cgi" in self .url :
121+ url = url .replace ("/xmlrpc.cgi" , querystr )
122+ else :
123+ url += querystr
116124 out = self .clicomm ("query --from-url \" %s\" " % url )
117125 self .assertEqual (len (out .splitlines ()), count )
118126 self .assertTrue (expectstr in out )
@@ -222,7 +230,7 @@ class RHTest(BaseTest):
222230 "sum=%{summary}\" " ,
223231 "id=307471 sw= bzcl34nup needinfo= " )
224232 test11 = lambda s : BaseTest ._testQueryURL (s ,
225- "https://bugzilla.redhat.com /buglist.cgi?f1=creation_ts"
233+ "/buglist.cgi?f1=creation_ts"
226234 "&list_id=973582&o1=greaterthaneq&classification=Fedora&"
227235 "o2=lessthaneq&query_format=advanced&f2=creation_ts"
228236 "&v1=2010-01-01&component=python-bugzilla&v2=2011-01-01"
0 commit comments