File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ def getBugzillaClassForURL(url):
3232 bzversion = ''
3333 c = None
3434
35+ if url .count ("novell.com" ):
36+ logging .debug ("Detected Novell bugzilla based on novell.com" )
37+ return NovellBugzilla
38+
3539 # Check for a Red Hat extension
3640 try :
3741 log .debug ("Checking for Red Hat Bugzilla extension" )
@@ -44,7 +48,7 @@ def getBugzillaClassForURL(url):
4448
4549 # Try to get the bugzilla version string
4650 try :
47- log .debug ("Checking return value of Buzilla .version()" )
51+ log .debug ("Checking return value of Bugzilla .version()" )
4852 r = s .Bugzilla .version ()
4953 bzversion = r ['version' ]
5054 except xmlrpclib .Fault :
Original file line number Diff line number Diff line change 1717import urllib2
1818import urlparse
1919
20- from bugzilla import BugzillaError , Bugzilla32 , log
20+ from bugzilla import BugzillaError , Bugzilla34 , log
2121
2222
23- class NovellBugzilla (Bugzilla32 ):
23+ class NovellBugzilla (Bugzilla34 ):
2424 '''
2525 bugzilla.novell.com is a standard bugzilla 3.2 with some extensions, but
2626 it uses an proprietary and non-standard IChain login system. This class
Original file line number Diff line number Diff line change @@ -164,6 +164,27 @@ class BZ42(BaseTest):
164164165165
166166
167+ class NovellBugzilla (BaseTest ):
168+ url = "https://bugzilla.novell.com/xmlrpc.cgi"
169+ bzclass = bugzilla .NovellBugzilla
170+
171+ test0 = BaseTest ._testBZClass
172+
173+ test1 = lambda s : BaseTest ._testQuery (s ,
174+ "--product \" openSUSE 11.0\" --component Basesystem" ,
175+ 15 , "83209" )
176+
177+ def testLoginFail (self ):
178+ # Currently gives a 404 error, so something is busted.
179+ # However if I drop all the custom stuff plain ol BZ login works
180+ bz = self .bzclass (url = self .url , cookiefile = None )
181+ try :
182+ bz .login ("foouser" , "barpassword" )
183+ raise AssertionError ("Expected novell login fail" )
184+ except Exception , e :
185+ self .assertTrue ("404" in str (e ))
186+
187+
167188class RHTest (BaseTest ):
168189 url = "https://bugzilla.redhat.com/xmlrpc.cgi"
169190 bzclass = bugzilla .RHBugzilla
You can’t perform that action at this time.
0 commit comments